diff options
author | Vivek Pandya <vivekvpandya@gmail.com> | 2017-09-15 19:30:59 +0000 |
---|---|---|
committer | Vivek Pandya <vivekvpandya@gmail.com> | 2017-09-15 19:30:59 +0000 |
commit | 00d887447b05bd41ec77a897978bace2af287154 (patch) | |
tree | 7cbf2055a7483fff1223c6c911d64c2a0a9c704b /llvm/lib/IR/LLVMContextImpl.cpp | |
parent | aff1c4df2573db4c21143c990db268d85350fd54 (diff) | |
download | bcm5719-llvm-00d887447b05bd41ec77a897978bace2af287154.tar.gz bcm5719-llvm-00d887447b05bd41ec77a897978bace2af287154.zip |
This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352
It enables OptimizationRemarkEmitter::allowExtraAnalysis and MachineOptimizationRemarkEmitter::allowExtraAnalysis to return true not only for -fsave-optimization-record but when specific remarks are requested with
command line options.
The diagnostic handler used to be callback now this patch adds a class
DiagnosticHandler. It has virtual method to provide custom diagnostic handler
and methods to control which particular remarks are enabled.
However LLVM-C API users can still provide callback function for diagnostic handler.
llvm-svn: 313382
Diffstat (limited to 'llvm/lib/IR/LLVMContextImpl.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/LLVMContextImpl.cpp b/llvm/lib/IR/LLVMContextImpl.cpp index 57dd08b36fe..4b44a6b69ca 100644 --- a/llvm/lib/IR/LLVMContextImpl.cpp +++ b/llvm/lib/IR/LLVMContextImpl.cpp @@ -22,7 +22,8 @@ using namespace llvm; LLVMContextImpl::LLVMContextImpl(LLVMContext &C) - : VoidTy(C, Type::VoidTyID), + : DiagHandler(llvm::make_unique<DiagnosticHandler>()), + VoidTy(C, Type::VoidTyID), LabelTy(C, Type::LabelTyID), HalfTy(C, Type::HalfTyID), FloatTy(C, Type::FloatTyID), |