Simplify this code; no need for a custom subclass if it doesn't need
authorDan Gohman <gohman@apple.com>
Sun, 14 Feb 2010 02:48:58 +0000 (02:48 +0000)
committerDan Gohman <gohman@apple.com>
Sun, 14 Feb 2010 02:48:58 +0000 (02:48 +0000)
to override anything from the parent class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96150 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/IVUsers.cpp

index f6d53da3ab6e5704fb802924301b5d23a7d1ba06..4ce68683cd3ed0d5af04ac1e00725f3281ac009a 100644 (file)
@@ -322,13 +322,6 @@ const SCEV *IVUsers::getCanonicalExpr(const IVStrideUse &U) const {
   return RetVal;
 }
 
-namespace {
-
-// Suppress extraneous comments.
-class IVUsersAsmAnnotator : public AssemblyAnnotationWriter {};
-
-}
-
 void IVUsers::print(raw_ostream &OS, const Module *M) const {
   OS << "IV Users for loop ";
   WriteAsOperand(OS, L->getHeader(), false);
@@ -338,7 +331,9 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const {
   }
   OS << ":\n";
 
-  IVUsersAsmAnnotator Annotator;
+  // Use a defualt AssemblyAnnotationWriter to suppress the default info
+  // comments, which aren't relevant here.
+  AssemblyAnnotationWriter Annotator;
   for (ilist<IVStrideUse>::const_iterator UI = IVUses.begin(),
        E = IVUses.end(); UI != E; ++UI) {
     OS << "  ";