Added LLVM_ATTRIBUTE_UNUSED in r190061.
On Thu, Sep 5, 2013 at 5:54 PM, Richard Sandiford < [email protected]> wrote: > Probably old news, sorry, but this: > > Daniel Jasper <[email protected]> writes: > > @@ -1183,23 +1189,39 @@ void UnwrappedLineParser::parseObjCProto > > parseObjCUntilAtEnd(); > > } > > > > +static void printDebugInfo(const UnwrappedLine &Line, StringRef Prefix > = "") { > > + llvm::dbgs() << Prefix << "Line(" << Line.Level << ")" > > + << (Line.InPPDirective ? " MACRO" : "") << ": "; > > + for (std::list<UnwrappedLineNode>::const_iterator I = > Line.Tokens.begin(), > > + E = > Line.Tokens.end(); > > + I != E; ++I) { > > + llvm::dbgs() << I->Tok->Tok.getName() << " "; > > + } > > + for (std::list<UnwrappedLineNode>::const_iterator I = > Line.Tokens.begin(), > > + E = > Line.Tokens.end(); > > + I != E; ++I) { > > + const UnwrappedLineNode &Node = *I; > > + for (SmallVectorImpl<UnwrappedLine>::const_iterator > > + I = Node.Children.begin(), > > + E = Node.Children.end(); > > + I != E; ++I) { > > + printDebugInfo(*I, "\nChild: "); > > + } > > + } > > + llvm::dbgs() << "\n"; > > +} > > + > > void UnwrappedLineParser::addUnwrappedLine() { > > if (Line->Tokens.empty()) > > return; > > DEBUG({ > > - llvm::dbgs() << "Line(" << Line->Level << ")" > > - << (Line->InPPDirective ? " MACRO" : "") << ": "; > > - for (std::list<FormatToken *>::iterator I = Line->Tokens.begin(), > > - E = Line->Tokens.end(); > > - I != E; ++I) { > > - llvm::dbgs() << (*I)->Tok.getName() << " "; > > - } > > - llvm::dbgs() << "\n"; > > + if (CurrentLines == &Lines) > > + printDebugInfo(*Line); > > }); > > causes a -Werror release bootstrap to fail, because the function is > defined but not used in that case. > > Thanks, > Richard > >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
