[PATCH] D130823: [GIsel] Add missing space between type and name in GICombinerHelperArg

Kai Nacke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 30 09:29:10 PDT 2022


Kai created this revision.
Kai added reviewers: dsanders, arsenm, aemerson, nemanjai.
Herald added a project: All.
Kai requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

When using `AdditionalArguments` in a `GICombinerHelper`, the generator does not put a space between the type and the name.

E.g.

  let AdditionalArguments = [GICombinerHelperArg<"bool", "IsSomething">];

ends up as

  boolIsSomething) const;

in the generated file. This change adds a space between the type and the name.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130823

Files:
  llvm/utils/TableGen/GICombinerEmitter.cpp


Index: llvm/utils/TableGen/GICombinerEmitter.cpp
===================================================================
--- llvm/utils/TableGen/GICombinerEmitter.cpp
+++ llvm/utils/TableGen/GICombinerEmitter.cpp
@@ -842,7 +842,7 @@
                                                 Record *Combiner) {
   for (Record *Arg : Combiner->getValueAsListOfDefs("AdditionalArguments"))
     OS << ",\n    " << Arg->getValueAsString("Type")
-       << Arg->getValueAsString("Name");
+       << " " << Arg->getValueAsString("Name");
 }
 
 void GICombinerEmitter::run(raw_ostream &OS) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130823.448801.patch
Type: text/x-patch
Size: 573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220730/b76bcc17/attachment.bin>


More information about the llvm-commits mailing list