Pivnoy created this revision. Herald added a reviewer: JDevlieghere. Herald added a reviewer: aaron.ballman. Herald added a project: All. Pivnoy requested review of this revision. Herald added projects: clang, LLDB, LLVM. Herald added subscribers: llvm-commits, lldb-commits, cfe-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D157486 Files: clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaDeclAttr.cpp clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp lldb/source/Utility/ArchSpec.cpp llvm/tools/dsymutil/DwarfLinkerForBinary.cpp Index: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp =================================================================== --- llvm/tools/dsymutil/DwarfLinkerForBinary.cpp +++ llvm/tools/dsymutil/DwarfLinkerForBinary.cpp @@ -801,7 +801,8 @@ return error(toString(std::move(E))); } - if (llvm::TripleUtils::isOSDarwin(Map.getTriple()) && !Map.getBinaryPath().empty() && + if (llvm::TripleUtils::isOSDarwin(Map.getTriple()) && + !Map.getBinaryPath().empty() && ObjectType == Linker::OutputFileType::Object) return MachOUtils::generateDsymCompanion( Options.VFS, Map, Options.Translator, Index: lldb/source/Utility/ArchSpec.cpp =================================================================== --- lldb/source/Utility/ArchSpec.cpp +++ lldb/source/Utility/ArchSpec.cpp @@ -1416,7 +1416,8 @@ const unsigned unspecified = 0; const llvm::Triple &triple = GetTriple(); - if (llvm::TripleUtils::isOSDarwin(triple) && triple.getOSMajorVersion() == unspecified) + if (llvm::TripleUtils::isOSDarwin(triple) && + triple.getOSMajorVersion() == unspecified) return false; return true; Index: clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp =================================================================== --- clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp +++ clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp @@ -111,8 +111,9 @@ GTEST_SKIP(); // FIXME: libunwind on darwin is broken, see PR49692. - if (llvm::TripleUtils::isOSDarwin(Triple) && (Triple.getArch() == llvm::Triple::aarch64 || - Triple.getArch() == llvm::Triple::aarch64_32)) + if (llvm::TripleUtils::isOSDarwin(Triple) && + (Triple.getArch() == llvm::Triple::aarch64 || + Triple.getArch() == llvm::Triple::aarch64_32)) GTEST_SKIP(); llvm::cantFail(Interp->ParseAndExecute(ExceptionCode)); Index: clang/lib/Sema/SemaDeclAttr.cpp =================================================================== --- clang/lib/Sema/SemaDeclAttr.cpp +++ clang/lib/Sema/SemaDeclAttr.cpp @@ -45,7 +45,7 @@ #include "llvm/MC/MCSectionMachO.h" #include "llvm/Support/Error.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/TripleUtils.h" #include <optional> @@ -3195,7 +3195,8 @@ S.Diag(AL.getLoc(), diag::warn_attribute_invalid_on_definition) << "weak_import"; else if (isa<ObjCPropertyDecl>(D) || isa<ObjCMethodDecl>(D) || - (llvm::TripleUtils::isOSDarwin(S.Context.getTargetInfo().getTriple()) && + (llvm::TripleUtils::isOSDarwin( + S.Context.getTargetInfo().getTriple()) && (isa<ObjCInterfaceDecl>(D) || isa<EnumDecl>(D)))) { // Nothing to warn about here. } else Index: clang/lib/Sema/SemaDecl.cpp =================================================================== --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -12165,7 +12165,8 @@ // Darwin passes an undocumented fourth argument of type char**. If // other platforms start sprouting these, the logic below will start // getting shifty. - if (nparams == 4 && llvm::TripleUtils::isOSDarwin(Context.getTargetInfo().getTriple())) + if (nparams == 4 && + llvm::TripleUtils::isOSDarwin(Context.getTargetInfo().getTriple())) HasExtraParameters = false; if (HasExtraParameters) {
Index: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp =================================================================== --- llvm/tools/dsymutil/DwarfLinkerForBinary.cpp +++ llvm/tools/dsymutil/DwarfLinkerForBinary.cpp @@ -801,7 +801,8 @@ return error(toString(std::move(E))); } - if (llvm::TripleUtils::isOSDarwin(Map.getTriple()) && !Map.getBinaryPath().empty() && + if (llvm::TripleUtils::isOSDarwin(Map.getTriple()) && + !Map.getBinaryPath().empty() && ObjectType == Linker::OutputFileType::Object) return MachOUtils::generateDsymCompanion( Options.VFS, Map, Options.Translator, Index: lldb/source/Utility/ArchSpec.cpp =================================================================== --- lldb/source/Utility/ArchSpec.cpp +++ lldb/source/Utility/ArchSpec.cpp @@ -1416,7 +1416,8 @@ const unsigned unspecified = 0; const llvm::Triple &triple = GetTriple(); - if (llvm::TripleUtils::isOSDarwin(triple) && triple.getOSMajorVersion() == unspecified) + if (llvm::TripleUtils::isOSDarwin(triple) && + triple.getOSMajorVersion() == unspecified) return false; return true; Index: clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp =================================================================== --- clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp +++ clang/unittests/Interpreter/ExceptionTests/InterpreterExceptionTest.cpp @@ -111,8 +111,9 @@ GTEST_SKIP(); // FIXME: libunwind on darwin is broken, see PR49692. - if (llvm::TripleUtils::isOSDarwin(Triple) && (Triple.getArch() == llvm::Triple::aarch64 || - Triple.getArch() == llvm::Triple::aarch64_32)) + if (llvm::TripleUtils::isOSDarwin(Triple) && + (Triple.getArch() == llvm::Triple::aarch64 || + Triple.getArch() == llvm::Triple::aarch64_32)) GTEST_SKIP(); llvm::cantFail(Interp->ParseAndExecute(ExceptionCode)); Index: clang/lib/Sema/SemaDeclAttr.cpp =================================================================== --- clang/lib/Sema/SemaDeclAttr.cpp +++ clang/lib/Sema/SemaDeclAttr.cpp @@ -45,7 +45,7 @@ #include "llvm/MC/MCSectionMachO.h" #include "llvm/Support/Error.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/TripleUtils.h" #include <optional> @@ -3195,7 +3195,8 @@ S.Diag(AL.getLoc(), diag::warn_attribute_invalid_on_definition) << "weak_import"; else if (isa<ObjCPropertyDecl>(D) || isa<ObjCMethodDecl>(D) || - (llvm::TripleUtils::isOSDarwin(S.Context.getTargetInfo().getTriple()) && + (llvm::TripleUtils::isOSDarwin( + S.Context.getTargetInfo().getTriple()) && (isa<ObjCInterfaceDecl>(D) || isa<EnumDecl>(D)))) { // Nothing to warn about here. } else Index: clang/lib/Sema/SemaDecl.cpp =================================================================== --- clang/lib/Sema/SemaDecl.cpp +++ clang/lib/Sema/SemaDecl.cpp @@ -12165,7 +12165,8 @@ // Darwin passes an undocumented fourth argument of type char**. If // other platforms start sprouting these, the logic below will start // getting shifty. - if (nparams == 4 && llvm::TripleUtils::isOSDarwin(Context.getTargetInfo().getTriple())) + if (nparams == 4 && + llvm::TripleUtils::isOSDarwin(Context.getTargetInfo().getTriple())) HasExtraParameters = false; if (HasExtraParameters) {
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits