diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 55df204d98a44d..04e2f5248fce65 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1433,10 +1433,11 @@ Compilation *Driver::BuildCompilation(ArrayRef ArgList) { // Check if the environment version is valid. llvm::Triple Triple = TC.getTriple(); StringRef TripleVersionName = Triple.getEnvironmentVersionString(); - StringRef TripleObjectFormat = Triple.getObjectFormatTypeName(Triple.getObjectFormat()); + StringRef TripleObjectFormat = + Triple.getObjectFormatTypeName(Triple.getObjectFormat()); - if (Triple.getEnvironmentVersion().empty() && TripleVersionName != "" - && TripleVersionName != TripleObjectFormat) { + if (Triple.getEnvironmentVersion().empty() && TripleVersionName != "" && + TripleVersionName != TripleObjectFormat) { Diags.Report(diag::err_drv_triple_version_invalid) << TripleVersionName << TC.getTripleString(); ContainsError = true; diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h index ac8931871eef06..1031e4d091bf2f 100644 --- a/llvm/include/llvm/TargetParser/Triple.h +++ b/llvm/include/llvm/TargetParser/Triple.h @@ -255,7 +255,7 @@ class Triple { Cygnus, CoreCLR, Simulator, // Simulator variants of other systems, e.g., Apple's iOS - MacABI, // Mac Catalyst variant of Apple's iOS deployment target. + MacABI, // Mac Catalyst variant of Apple's iOS deployment target. // Shader Stages // The order of these values matters, and must be kept in sync with the diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp index 5e8ca8f224ff5e..3cf6a774f3678f 100644 --- a/llvm/lib/TargetParser/Triple.cpp +++ b/llvm/lib/TargetParser/Triple.cpp @@ -323,7 +323,8 @@ StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) { case Callable: return "callable"; case Mesh: return "mesh"; case Amplification: return "amplification"; - case OpenCL: return "opencl"; + case OpenCL: + return "opencl"; case OpenHOS: return "ohos"; } @@ -1220,7 +1221,8 @@ VersionTuple Triple::getEnvironmentVersion() const { StringRef Triple::getEnvironmentVersionString() const { StringRef EnvironmentName = getEnvironmentName(); - // none is a valid environment type - it basically amounts to a freestanding environment. + // none is a valid environment type - it basically amounts to a freestanding + // environment. if (EnvironmentName == "none") return "";