[PATCH] D71851: Use the first location in the fused location for diagnostic handler
Feng Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 14:44:58 PST 2020
liufengdb updated this revision to Diff 236459.
liufengdb added a comment.
fix
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71851/new/
https://reviews.llvm.org/D71851
Files:
mlir/test/lib/Transforms/TestDiagnosticHandler.cpp
Index: mlir/test/lib/Transforms/TestDiagnosticHandler.cpp
===================================================================
--- mlir/test/lib/Transforms/TestDiagnosticHandler.cpp
+++ mlir/test/lib/Transforms/TestDiagnosticHandler.cpp
@@ -14,11 +14,11 @@
namespace {
struct TestSourceMgrDiagnosticHandler : public SourceMgrDiagnosticHandler {
explicit TestSourceMgrDiagnosticHandler(llvm::SourceMgr &mgr,
- MLIRContext *ctx)
+ MLIRContext *ctx)
: SourceMgrDiagnosticHandler(mgr, ctx, llvm::outs()) {}
void emitTestDiagnostic(Operation *op) {
- Diagnostic diag(op->getLoc(), DiagnosticSeverity::Note);
+ Diagnostic diag(op->getLoc(), DiagnosticSeverity::Note);
emitDiagnostic(diag);
}
};
@@ -28,7 +28,7 @@
void runOnFunction() override {
llvm::SourceMgr fileSourceMgr;
- TestSourceMgrDiagnosticHandler diagHandler(fileSourceMgr, &getContext());
+ TestSourceMgrDiagnosticHandler diagHandler(fileSourceMgr, &getContext());
getFunction().walk([&](Operation *op) {
if (isa<FuncOp>(op) || op->isKnownTerminator())
return;
@@ -40,4 +40,4 @@
} // end anonymous namespace
static PassRegistration<TestDiagnosticHandler> pass("test-diagnostic-handler",
- "emit diagnostic for ops");
+ "emit diagnostic for ops");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71851.236459.patch
Type: text/x-patch
Size: 1478 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200106/b494220c/attachment.bin>
More information about the llvm-commits
mailing list