summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-06-17 23:14:26 +0000
committerDouglas Gregor <dgregor@apple.com>2010-06-17 23:14:26 +0000
commitebada077d93b0fe4134b347a90efec665b629b25 (patch)
treefc8a35501d61d350fe217f80b702858eb4d6eb28 /clang/lib/Sema/Sema.cpp
parent6b98f7129f535bba826bb7dfa3a7fd6297330448 (diff)
downloadbcm5719-llvm-ebada077d93b0fe4134b347a90efec665b629b25.tar.gz
bcm5719-llvm-ebada077d93b0fe4134b347a90efec665b629b25.zip
Given Decl::isUsed() a flag indicating when to consider the "used"
attribute as part of the calculation. Sema::MarkDeclReferenced(), and a few other places, want only to consider the "used" bit to determine, e.g, whether to perform template instantiation. Fixes a linkage issue with Boost.Serialization. llvm-svn: 106252
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 8bdf971d965..eadc2ad253d 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -226,7 +226,8 @@ void Sema::ActOnEndOfTranslationUnit() {
// Remove functions that turned out to be used.
UnusedStaticFuncs.erase(std::remove_if(UnusedStaticFuncs.begin(),
UnusedStaticFuncs.end(),
- std::mem_fun(&FunctionDecl::isUsed)),
+ std::bind2nd(std::mem_fun(&FunctionDecl::isUsed),
+ true)),
UnusedStaticFuncs.end());
// Check for #pragma weak identifiers that were never declared
OpenPOWER on IntegriCloud