[PATCH] D33514: [WIP] Bug 32352 - Provide a way for OptimizationRemarkEmitter::allowExtraAnalysis to check if (specific) remarks are enabled

Adam Nemet via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 11 21:10:21 PDT 2017


anemet accepted this revision.
anemet added a comment.
This revision is now accepted and ready to land.

LGTM with the nits below.  Thanks!



================
Comment at: include/llvm/IR/DiagnosticHandler.h:1
+//===- DiagnosticHandler.cpp - DiagnosticHandler class for LLVM -*- C++ -*-===//
+//
----------------
DiagnosticHandler.h


================
Comment at: lib/IR/LLVMContext.cpp:197
     return Remark->isEnabled();
-
   return true;
----------------
Remove this whitespace change


================
Comment at: lib/IR/LLVMContextImpl.cpp:25
 LLVMContextImpl::LLVMContextImpl(LLVMContext &C)
-  : VoidTy(C, Type::VoidTyID),
+  : DiagHandler(llvm::make_unique<DiagnosticHandler>(nullptr)),
+    VoidTy(C, Type::VoidTyID),
----------------
No need to pass nullptr here.


https://reviews.llvm.org/D33514





More information about the cfe-commits mailing list