r282545 - Shorten DiagnosticInfoOptimizationRemark* to OptimizationRemark*. NFC

Adam Nemet via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 27 15:19:29 PDT 2016


Author: anemet
Date: Tue Sep 27 17:19:29 2016
New Revision: 282545

URL: http://llvm.org/viewvc/llvm-project?rev=282545&view=rev
Log:
Shorten DiagnosticInfoOptimizationRemark* to OptimizationRemark*. NFC

With the new streaming interface in LLVM, these class names need to be
typed a lot and it's way too looong.

Modified:
    cfe/trunk/lib/CodeGen/CodeGenAction.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=282545&r1=282544&r2=282545&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Tue Sep 27 17:19:29 2016
@@ -260,16 +260,13 @@ namespace clang {
     /// them.
     void EmitOptimizationMessage(const llvm::DiagnosticInfoOptimizationBase &D,
                                  unsigned DiagID);
-    void
-    OptimizationRemarkHandler(const llvm::DiagnosticInfoOptimizationRemark &D);
+    void OptimizationRemarkHandler(const llvm::OptimizationRemark &D);
+    void OptimizationRemarkHandler(const llvm::OptimizationRemarkMissed &D);
+    void OptimizationRemarkHandler(const llvm::OptimizationRemarkAnalysis &D);
     void OptimizationRemarkHandler(
-        const llvm::DiagnosticInfoOptimizationRemarkMissed &D);
+        const llvm::OptimizationRemarkAnalysisFPCommute &D);
     void OptimizationRemarkHandler(
-        const llvm::DiagnosticInfoOptimizationRemarkAnalysis &D);
-    void OptimizationRemarkHandler(
-        const llvm::DiagnosticInfoOptimizationRemarkAnalysisFPCommute &D);
-    void OptimizationRemarkHandler(
-        const llvm::DiagnosticInfoOptimizationRemarkAnalysisAliasing &D);
+        const llvm::OptimizationRemarkAnalysisAliasing &D);
     void OptimizationFailureHandler(
         const llvm::DiagnosticInfoOptimizationFailure &D);
   };
@@ -533,7 +530,7 @@ void BackendConsumer::EmitOptimizationMe
 }
 
 void BackendConsumer::OptimizationRemarkHandler(
-    const llvm::DiagnosticInfoOptimizationRemark &D) {
+    const llvm::OptimizationRemark &D) {
   // Optimization remarks are active only if the -Rpass flag has a regular
   // expression that matches the name of the pass name in \p D.
   if (CodeGenOpts.OptimizationRemarkPattern &&
@@ -542,7 +539,7 @@ void BackendConsumer::OptimizationRemark
 }
 
 void BackendConsumer::OptimizationRemarkHandler(
-    const llvm::DiagnosticInfoOptimizationRemarkMissed &D) {
+    const llvm::OptimizationRemarkMissed &D) {
   // Missed optimization remarks are active only if the -Rpass-missed
   // flag has a regular expression that matches the name of the pass
   // name in \p D.
@@ -553,7 +550,7 @@ void BackendConsumer::OptimizationRemark
 }
 
 void BackendConsumer::OptimizationRemarkHandler(
-    const llvm::DiagnosticInfoOptimizationRemarkAnalysis &D) {
+    const llvm::OptimizationRemarkAnalysis &D) {
   // Optimization analysis remarks are active if the pass name is set to
   // llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
   // regular expression that matches the name of the pass name in \p D.
@@ -566,7 +563,7 @@ void BackendConsumer::OptimizationRemark
 }
 
 void BackendConsumer::OptimizationRemarkHandler(
-    const llvm::DiagnosticInfoOptimizationRemarkAnalysisFPCommute &D) {
+    const llvm::OptimizationRemarkAnalysisFPCommute &D) {
   // Optimization analysis remarks are active if the pass name is set to
   // llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
   // regular expression that matches the name of the pass name in \p D.
@@ -579,7 +576,7 @@ void BackendConsumer::OptimizationRemark
 }
 
 void BackendConsumer::OptimizationRemarkHandler(
-    const llvm::DiagnosticInfoOptimizationRemarkAnalysisAliasing &D) {
+    const llvm::OptimizationRemarkAnalysisAliasing &D) {
   // Optimization analysis remarks are active if the pass name is set to
   // llvm::DiagnosticInfo::AlwasyPrint or if the -Rpass-analysis flag has a
   // regular expression that matches the name of the pass name in \p D.
@@ -623,30 +620,27 @@ void BackendConsumer::DiagnosticHandlerI
   case llvm::DK_OptimizationRemark:
     // Optimization remarks are always handled completely by this
     // handler. There is no generic way of emitting them.
-    OptimizationRemarkHandler(cast<DiagnosticInfoOptimizationRemark>(DI));
+    OptimizationRemarkHandler(cast<OptimizationRemark>(DI));
     return;
   case llvm::DK_OptimizationRemarkMissed:
     // Optimization remarks are always handled completely by this
     // handler. There is no generic way of emitting them.
-    OptimizationRemarkHandler(cast<DiagnosticInfoOptimizationRemarkMissed>(DI));
+    OptimizationRemarkHandler(cast<OptimizationRemarkMissed>(DI));
     return;
   case llvm::DK_OptimizationRemarkAnalysis:
     // Optimization remarks are always handled completely by this
     // handler. There is no generic way of emitting them.
-    OptimizationRemarkHandler(
-        cast<DiagnosticInfoOptimizationRemarkAnalysis>(DI));
+    OptimizationRemarkHandler(cast<OptimizationRemarkAnalysis>(DI));
     return;
   case llvm::DK_OptimizationRemarkAnalysisFPCommute:
     // Optimization remarks are always handled completely by this
     // handler. There is no generic way of emitting them.
-    OptimizationRemarkHandler(
-        cast<DiagnosticInfoOptimizationRemarkAnalysisFPCommute>(DI));
+    OptimizationRemarkHandler(cast<OptimizationRemarkAnalysisFPCommute>(DI));
     return;
   case llvm::DK_OptimizationRemarkAnalysisAliasing:
     // Optimization remarks are always handled completely by this
     // handler. There is no generic way of emitting them.
-    OptimizationRemarkHandler(
-        cast<DiagnosticInfoOptimizationRemarkAnalysisAliasing>(DI));
+    OptimizationRemarkHandler(cast<OptimizationRemarkAnalysisAliasing>(DI));
     return;
   case llvm::DK_OptimizationFailure:
     // Optimization failures are always handled completely by this




More information about the cfe-commits mailing list