diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2019-09-11 09:16:17 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2019-09-11 09:16:17 +0000 |
commit | 57256af307ab7bdf42c47da019a1a288b9f9451a (patch) | |
tree | 27b79009fe825ffd54dd574662213f2d659f35fd /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 73ec745793acdddc505610ae6a1087ada3140ef2 (diff) | |
download | bcm5719-llvm-57256af307ab7bdf42c47da019a1a288b9f9451a.tar.gz bcm5719-llvm-57256af307ab7bdf42c47da019a1a288b9f9451a.zip |
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
This reverts commit r371584. It introduced a dependency from compiler-rt
to llvm/include/ADT, which is problematic for multiple reasons.
One is that it is a novel dependency edge, which needs cross-compliation
machinery for llvm/include/ADT (yes, it is true that right now
compiler-rt included only header-only libraries, however, if we allow
compiler-rt to depend on anything from ADT, other libraries will
eventually get used).
Secondly, depending on ADT from compiler-rt exposes ADT symbols from
compiler-rt, which would cause ODR violations when Clang is built with
the profile library.
llvm-svn: 371598
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 87bda4a0fc2..2356f84c05d 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -14,7 +14,6 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/DeclCXX.h" #include "clang/AST/DeclGroup.h" -#include "clang/Basic/DiagnosticFrontend.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/LangStandard.h" #include "clang/Basic/SourceManager.h" @@ -366,9 +365,6 @@ namespace clang { bool StackSizeDiagHandler(const llvm::DiagnosticInfoStackSize &D); /// Specialized handler for unsupported backend feature diagnostic. void UnsupportedDiagHandler(const llvm::DiagnosticInfoUnsupported &D); - /// Specialized handler for misexpect warnings. - /// Note that misexpect remarks are emitted through ORE - void MisExpectDiagHandler(const llvm::DiagnosticInfoMisExpect &D); /// Specialized handlers for optimization remarks. /// Note that these handlers only accept remarks and they always handle /// them. @@ -621,25 +617,6 @@ void BackendConsumer::UnsupportedDiagHandler( << Filename << Line << Column; } -void BackendConsumer::MisExpectDiagHandler( - const llvm::DiagnosticInfoMisExpect &D) { - StringRef Filename; - unsigned Line, Column; - bool BadDebugInfo = false; - FullSourceLoc Loc = - getBestLocationFromDebugLoc(D, BadDebugInfo, Filename, Line, Column); - - Diags.Report(Loc, diag::warn_profile_data_misexpect) << D.getMsg().str(); - - if (BadDebugInfo) - // If we were not able to translate the file:line:col information - // back to a SourceLocation, at least emit a note stating that - // we could not translate this location. This can happen in the - // case of #line directives. - Diags.Report(Loc, diag::note_fe_backend_invalid_loc) - << Filename << Line << Column; -} - void BackendConsumer::EmitOptimizationMessage( const llvm::DiagnosticInfoOptimizationBase &D, unsigned DiagID) { // We only support warnings and remarks. @@ -810,9 +787,6 @@ void BackendConsumer::DiagnosticHandlerImpl(const DiagnosticInfo &DI) { case llvm::DK_Unsupported: UnsupportedDiagHandler(cast<DiagnosticInfoUnsupported>(DI)); return; - case llvm::DK_MisExpect: - MisExpectDiagHandler(cast<DiagnosticInfoMisExpect>(DI)); - return; default: // Plugin IDs are not bound to any value as they are set dynamically. ComputeDiagRemarkID(Severity, backend_plugin, DiagID); |