[clang] [PowerPC] Add an alias for -mregnames so that full register names used in assembly. (PR #70255)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 25 14:38:36 PDT 2023


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 740582fa4c9512b34128dc97b2eff56820984421 a561647c59119eb8da82e0468d9158e674102904 -- clang/test/CodeGen/PowerPC/ppc-full-reg-names.c clang/lib/Basic/Targets/PPC.cpp clang/lib/Basic/Targets/PPC.h llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
index 17498627a84f..03ef587c777a 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp
@@ -613,11 +613,9 @@ bool PPCInstPrinter::showRegistersWithPercentPrefix(const char *RegName) const {
 
 /// getVerboseConditionalRegName - This method expands the condition register
 /// when requested explicitly or targetting Darwin.
-const char *PPCInstPrinter::getVerboseConditionRegName(unsigned RegNum,
-                                                       unsigned RegEncoding,
-                                                       const MCSubtargetInfo &STI)
-                                                       const {
-                                                         // __SP__
+const char *PPCInstPrinter::getVerboseConditionRegName(
+    unsigned RegNum, unsigned RegEncoding, const MCSubtargetInfo &STI) const {
+  // __SP__
   if (!FullRegNames && !STI.hasFeature(PPC::FeatureFullRegisterNames))
     return nullptr;
   if (RegNum < PPC::CR0EQ || RegNum > PPC::CR7UN)
diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.h b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.h
index 2e29971a20fc..a75ae3b400a2 100644
--- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.h
+++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.h
@@ -23,8 +23,7 @@ class PPCInstPrinter : public MCInstPrinter {
 private:
   bool showRegistersWithPercentPrefix(const char *RegName) const;
   bool showRegistersWithPrefix(const MCSubtargetInfo &STI) const;
-  const char *getVerboseConditionRegName(unsigned RegNum,
-                                         unsigned RegEncoding,
+  const char *getVerboseConditionRegName(unsigned RegNum, unsigned RegEncoding,
                                          const MCSubtargetInfo &STI) const;
 
 public:

``````````

</details>


https://github.com/llvm/llvm-project/pull/70255


More information about the cfe-commits mailing list