[PATCH] D102244: [llvm][AsmPrinter] Restore source location to register clobber warning

Yuanfang Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 12 10:59:54 PDT 2021


ychen added a comment.

Looks good except for one suggestion and the patch need rebasing on an upstream commit.



================
Comment at: llvm/include/llvm/IR/LLVMContext.h:300
+  /// with "warning: " and should not end with a ".".
+  void emitWarning(unsigned LocCookie, const Twine &WarningStr);
+
----------------
It would be best to avoid adding these two methods for single-use since `LLVMContext.h` is included everywhere. We could add them once it turns out to be needed in other places. Could we use `LLVMContext::diagnose` instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102244



More information about the cfe-commits mailing list