diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-18 16:30:42 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2012-07-18 16:30:42 +0000 |
commit | fb3643a7509dcde7fb0fb7290e4b3b42b317700c (patch) | |
tree | 9a666fde7ce415cdb7fcb8a1c87629e4d99fac80 /lib/AST/CommentDumper.cpp | |
parent | 572eec1bdeb3b782d27aedd27c36a8d8168e261c (diff) |
On Darwin, the linker removes functions in CommentDumper.o (Comment::dump())
despite __attribute__(__used__). As explained by Argyrios,
> .a archive files do some stripping of their own and they remove .o files that
> contain functions that are not referenced by any other .o file.
The fix is to use these functions from another .o file.
Thanks, Argyrios!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/CommentDumper.cpp')
-rw-r--r-- | lib/AST/CommentDumper.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/AST/CommentDumper.cpp b/lib/AST/CommentDumper.cpp index 7a075a6748..5de5ef544f 100644 --- a/lib/AST/CommentDumper.cpp +++ b/lib/AST/CommentDumper.cpp @@ -181,14 +181,8 @@ void CommentDumper::visitFullComment(const FullComment *C) { } // unnamed namespace -void Comment::dump() const { - CommentDumper D(llvm::errs(), NULL); - D.dumpSubtree(this); - llvm::errs() << '\n'; -} - -void Comment::dump(SourceManager &SM) const { - CommentDumper D(llvm::errs(), &SM); +void Comment::dump(llvm::raw_ostream &OS, SourceManager *SM) const { + CommentDumper D(llvm::errs(), SM); D.dumpSubtree(this); llvm::errs() << '\n'; } |