[PATCH] D103036: [cfe][inline-asm] Support target-specific escaped character in inline asm

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 24 10:16:51 PDT 2021


nickdesaulniers added inline comments.


================
Comment at: clang/include/clang/Basic/TargetInfo.h:1094-1095
 
+  // Replace some escaped characters with another string based on
+  // target-specific rules
+  virtual llvm::Optional<std::string> handleAsmEscapedChar(char C) const {
----------------
Use triple slashes so that a Doxygen comment can be produced.  End sentence with a period.


================
Comment at: clang/lib/AST/Stmt.cpp:671
     }
+    // Handle target-specific escaped characters
+    if (auto MaybeReplaceStr = TI.handleAsmEscapedChar(EscapedChar)) {
----------------
nickdesaulniers wrote:
> Do you want to move this addition into the `default` case above?
Terminate sentence with period.


================
Comment at: clang/lib/AST/Stmt.cpp:671-675
+    // Handle target-specific escaped characters
+    if (auto MaybeReplaceStr = TI.handleAsmEscapedChar(EscapedChar)) {
+      CurStringPiece += *MaybeReplaceStr;
+      continue;
+    }
----------------
Do you want to move this addition into the `default` case above?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103036/new/

https://reviews.llvm.org/D103036



More information about the cfe-commits mailing list