Author: ericwf Date: Sun Sep 30 11:05:39 2018 New Revision: 343420 URL: http://llvm.org/viewvc/llvm-project?rev=343420&view=rev Log: 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. Modified: cfe/trunk/include/clang/Analysis/ProgramPoint.h cfe/trunk/lib/Analysis/ProgramPoint.cpp Modified: cfe/trunk/include/clang/Analysis/ProgramPoint.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/ProgramPoint.h?rev=343420&r1=343419&r2=343420&view=diff ============================================================================== --- cfe/trunk/include/clang/Analysis/ProgramPoint.h (original) +++ cfe/trunk/include/clang/Analysis/ProgramPoint.h Sun Sep 30 11:05:39 2018 @@ -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, Modified: cfe/trunk/lib/Analysis/ProgramPoint.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/ProgramPoint.cpp?rev=343420&r1=343419&r2=343420&view=diff ============================================================================== --- cfe/trunk/lib/Analysis/ProgramPoint.cpp (original) +++ cfe/trunk/lib/Analysis/ProgramPoint.cpp Sun Sep 30 11:05:39 2018 @@ -43,6 +43,10 @@ ProgramPoint ProgramPoint::getProgramPoi } } +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, _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits