[llvm] [llvm-(min-)tblgen] Avoid redundant source compilation (PR #114494)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 08:42:48 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 092a819e94da3fc0cac6982e99861546237fcb04 4d3124341492c1eafb22f85e3c71958f058c8962 --extensions cpp -- llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp llvm/utils/TableGen/Basic/Attributes.cpp llvm/utils/TableGen/Basic/DirectiveEmitter.cpp llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp llvm/utils/TableGen/Basic/RISCVTargetDefEmitter.cpp llvm/utils/TableGen/Basic/TableGen.cpp llvm/utils/TableGen/Basic/VTEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp b/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
index 792d047139..0bac94b3ec 100644
--- a/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
@@ -260,14 +260,15 @@ static void emitARMTargetDef(const RecordKeeper &RK, raw_ostream &OS) {
auto Name = Rec->getValueAsString("Name");
auto Alias = Rec->getValueAsString("Alias");
if (!Processors.contains(Alias))
- PrintFatalError(
- Rec, "Alias '" + Name + "' references a non-existent ProcessorModel '" + Alias + "'");
+ PrintFatalError(Rec, "Alias '" + Name +
+ "' references a non-existent ProcessorModel '" +
+ Alias + "'");
if (Processors.contains(Name))
- PrintFatalError(
- Rec, "Alias '" + Name + "' duplicates an existing ProcessorModel");
+ PrintFatalError(Rec, "Alias '" + Name +
+ "' duplicates an existing ProcessorModel");
if (!Aliases.insert(Name).second)
- PrintFatalError(
- Rec, "Alias '" + Name + "' duplicates an existing ProcessorAlias");
+ PrintFatalError(Rec, "Alias '" + Name +
+ "' duplicates an existing ProcessorAlias");
OS << llvm::formatv(R"( { "{0}", "{1}" },)", Name, Alias) << '\n';
}
diff --git a/llvm/utils/TableGen/Basic/VTEmitter.cpp b/llvm/utils/TableGen/Basic/VTEmitter.cpp
index d02932dd5e..3b0809441a 100644
--- a/llvm/utils/TableGen/Basic/VTEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/VTEmitter.cpp
@@ -131,7 +131,7 @@ void VTEmitter::run(raw_ostream &OS) {
bool IsScalable = VT->getValueAsBit("isScalable");
bool IsRISCVVecTuple = VT->getValueAsBit("isRISCVVecTuple");
int64_t NF = VT->getValueAsInt("NF");
- bool IsNormalValueType = VT->getValueAsBit("isNormalValueType");
+ bool IsNormalValueType = VT->getValueAsBit("isNormalValueType");
int64_t NElem = IsVector ? VT->getValueAsInt("nElem") : 0;
StringRef EltName = IsVector ? VT->getValueAsDef("ElementType")->getName()
: "INVALID_SIMPLE_VALUE_TYPE";
``````````
</details>
https://github.com/llvm/llvm-project/pull/114494
More information about the llvm-commits
mailing list