Fix linkage error on ProgramPoint's dump method.

Currently, ProgramPoint::dump calls the out-of-line function ProgramPoint::print. This causes
libraries which include ProgramPoint.h to become dependent on libclangAnalysis, which in turn
causes missing symbol link error when building with -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_MODULES=ON.

The breakage was introduced in r343160.

This patch fixes the issues by moving ProgramPoint::dump's declaration out of line.

llvm-svn: 343420
This commit is contained in:
Eric Fiselier 2018-09-30 18:05:39 +00:00
parent 99ad2a5723
commit 407584c433
2 changed files with 5 additions and 3 deletions

View File

@ -217,9 +217,7 @@ public:
void print(StringRef CR, llvm::raw_ostream &Out) const;
LLVM_DUMP_METHOD void dump() const {
return print(/*CR=*/"\n", llvm::errs());
}
LLVM_DUMP_METHOD void dump() const;
static ProgramPoint getProgramPoint(const Stmt *S, ProgramPoint::Kind K,
const LocationContext *LC,

View File

@ -43,6 +43,10 @@ ProgramPoint ProgramPoint::getProgramPoint(const Stmt *S, ProgramPoint::Kind K,
}
}
LLVM_DUMP_METHOD void ProgramPoint::dump() const {
return print(/*CR=*/"\n", llvm::errs());
}
static void printLocation(raw_ostream &Out, SourceLocation SLoc,
const SourceManager &SM,
StringRef CR,