]> granicus.if.org Git - clang/commitdiff
Basic/Diagnostics: Eliminate getDiagnosticMappingInfo method, which wasn't worth...
authorDaniel Dunbar <daniel@zuster.org>
Thu, 29 Sep 2011 01:25:14 +0000 (01:25 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 29 Sep 2011 01:25:14 +0000 (01:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140759 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Diagnostic.h
lib/Basic/DiagnosticIDs.cpp

index 71240f4fdcd84202142836096e0f3260f94a484c..4136b5cc0598c0aec0b349173d28b964e960f338 100644 (file)
@@ -563,15 +563,6 @@ private:
   /// \brief Report the delayed diagnostic.
   void ReportDelayed();
 
-
-  /// getDiagnosticMappingInfo - Return the mapping info currently set for the
-  /// specified builtin diagnostic.  This returns the high bit encoding, or zero
-  /// if the field is completely uninitialized.
-  diag::Mapping getDiagnosticMappingInfo(diag::kind Diag,
-                                         DiagState *State) const {
-    return State->getMapping(Diag);
-  }
-
   void setDiagnosticMappingInternal(unsigned DiagId, unsigned Map,
                                     DiagState *State,
                                     bool isUser, bool isPragma) const {
index 1e76a26de72936326eae8c4dd8328f47769931f1..d8a0afc1cc57e3a40e4c7e1fe430cd82a1299639 100644 (file)
@@ -507,8 +507,7 @@ DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, unsigned DiagClass,
   DiagnosticsEngine::DiagState *State = Pos->State;
 
   // Get the mapping information, if unset, compute it lazily.
-  unsigned MappingInfo = Diag.getDiagnosticMappingInfo((diag::kind)DiagID,
-                                                       State);
+  unsigned MappingInfo = State->getMapping((diag::kind) DiagID);
   if (MappingInfo == 0) {
     MappingInfo = GetDefaultDiagMapping(DiagID);
     Diag.setDiagnosticMappingInternal(DiagID, MappingInfo, State, false, false);