[llvm] [NFC][TableGen] Replace DefInit::get() with Record::getDefInit() (PR #107762)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 8 08:27:17 PDT 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 0f1bc5dbf3c51a1ee33d6037a6a169f0b0fbe217 df6640d58b1431889b4d6f9d6746121e7b8621a4 --extensions h,cpp -- llvm/include/llvm/TableGen/Record.h llvm/lib/TableGen/Record.cpp llvm/utils/TableGen/Common/CodeGenDAGPatterns.cpp llvm/utils/TableGen/Common/CodeGenRegisters.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp
index 25fc10b2bb..85516b7b9f 100644
--- a/llvm/lib/TableGen/Record.cpp
+++ b/llvm/lib/TableGen/Record.cpp
@@ -2292,7 +2292,7 @@ DefInit *VarDefInit::instantiate() {
RecordKeeper &Records = Class->getRecords();
auto NewRecOwner =
std::make_unique<Record>(Records.getNewAnonymousName(), Class->getLoc(),
- Records, Record::RK_AnonymousDef);
+ Records, Record::RK_AnonymousDef);
Record *NewRec = NewRecOwner.get();
// Copy values from class to instance
@@ -2328,9 +2328,8 @@ DefInit *VarDefInit::instantiate() {
for (const auto &SCPair : SCs)
NewRec->addSuperClass(SCPair.first, SCPair.second);
- NewRec->addSuperClass(Class,
- SMRange(Class->getLoc().back(),
- Class->getLoc().back()));
+ NewRec->addSuperClass(
+ Class, SMRange(Class->getLoc().back(), Class->getLoc().back()));
// Resolve internal references and store in record keeper
NewRec->resolveReferences();
``````````
</details>
https://github.com/llvm/llvm-project/pull/107762
More information about the llvm-commits
mailing list