forked from OSchip/llvm-project
Do NOT use inline functions with LLVM_ATTRIBUTE_USED.
The function will be emitted into every single TU including the header! llvm-svn: 161872
This commit is contained in:
parent
bf479714f9
commit
9299d8c298
|
@ -858,10 +858,10 @@ public:
|
|||
raw_ostream &Out, const PrintingPolicy &Policy,
|
||||
unsigned Indentation = 0);
|
||||
// Debuggers don't usually respect default arguments.
|
||||
LLVM_ATTRIBUTE_USED void dump() const { dump(llvm::errs()); }
|
||||
LLVM_ATTRIBUTE_USED void dump() const;
|
||||
void dump(raw_ostream &Out) const;
|
||||
// Debuggers don't usually respect default arguments.
|
||||
LLVM_ATTRIBUTE_USED void dumpXML() const { dumpXML(llvm::errs()); }
|
||||
LLVM_ATTRIBUTE_USED void dumpXML() const;
|
||||
void dumpXML(raw_ostream &OS) const;
|
||||
|
||||
private:
|
||||
|
|
|
@ -328,7 +328,7 @@ public:
|
|||
|
||||
// For debugging purposes only
|
||||
void dump(raw_ostream &Out) const;
|
||||
LLVM_ATTRIBUTE_USED void dump() const { dump(llvm::errs()); }
|
||||
LLVM_ATTRIBUTE_USED void dump() const;
|
||||
|
||||
static bool classof(const CallEvent *) { return true; }
|
||||
};
|
||||
|
|
|
@ -175,6 +175,10 @@ void DeclContext::dumpDeclContext() const {
|
|||
Printer.VisitDeclContext(const_cast<DeclContext *>(this), /*Indent=*/false);
|
||||
}
|
||||
|
||||
void Decl::dump() const {
|
||||
dump(llvm::errs());
|
||||
}
|
||||
|
||||
void Decl::dump(raw_ostream &Out) const {
|
||||
PrintingPolicy Policy = getASTContext().getPrintingPolicy();
|
||||
Policy.Dump = true;
|
||||
|
|
|
@ -1022,12 +1022,17 @@ struct XMLDumper : public XMLDeclVisitor<XMLDumper>,
|
|||
};
|
||||
}
|
||||
|
||||
void Decl::dumpXML() const {
|
||||
dump(llvm::errs());
|
||||
}
|
||||
|
||||
void Decl::dumpXML(raw_ostream &out) const {
|
||||
XMLDumper(out, getASTContext()).dispatch(const_cast<Decl*>(this));
|
||||
}
|
||||
|
||||
#else /* ifndef NDEBUG */
|
||||
|
||||
void Decl::dumpXML() const {}
|
||||
void Decl::dumpXML(raw_ostream &out) const {}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -207,6 +207,10 @@ SourceRange CallEvent::getArgSourceRange(unsigned Index) const {
|
|||
return ArgE->getSourceRange();
|
||||
}
|
||||
|
||||
void CallEvent::dump() const {
|
||||
dump(llvm::errs());
|
||||
}
|
||||
|
||||
void CallEvent::dump(raw_ostream &Out) const {
|
||||
ASTContext &Ctx = getState()->getStateManager().getContext();
|
||||
if (const Expr *E = getOriginExpr()) {
|
||||
|
|
Loading…
Reference in New Issue