summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2016-04-27 17:26:08 +0000
committerNico Weber <nicolasweber@gmx.de>2016-04-27 17:26:08 +0000
commit3a947631019015b5d149a5afbba6914d56ca05e7 (patch)
tree65bb8b65c3333b5c60667be60f42714835054473 /clang/include
parent7efdca5622cfd472ccca6fd2b0b830e526abbd48 (diff)
downloadbcm5719-llvm-3a947631019015b5d149a5afbba6914d56ca05e7.tar.gz
bcm5719-llvm-3a947631019015b5d149a5afbba6914d56ca05e7.zip
Revert r267691, it caused PR27535.
llvm-svn: 267744
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/AST/DeclBase.h7
-rw-r--r--clang/include/clang/Serialization/ASTWriter.h11
2 files changed, 3 insertions, 15 deletions
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h
index 26cbd3802fc..f7ddb5bd641 100644
--- a/clang/include/clang/AST/DeclBase.h
+++ b/clang/include/clang/AST/DeclBase.h
@@ -518,8 +518,8 @@ public:
bool isImplicit() const { return Implicit; }
void setImplicit(bool I = true) { Implicit = I; }
- /// \brief Whether *any* (re-)declaration of the entity was used, meaning that
- /// a definition is required.
+ /// \brief Whether this declaration was used, meaning that a definition
+ /// is required.
///
/// \param CheckUsedAttr When true, also consider the "used" attribute
/// (in addition to the "used" bit set by \c setUsed()) when determining
@@ -529,8 +529,7 @@ public:
/// \brief Set whether the declaration is used, in the sense of odr-use.
///
/// This should only be used immediately after creating a declaration.
- /// It intentionally doesn't notify any listeners.
- void setIsUsed() { getCanonicalDecl()->Used = true; }
+ void setIsUsed() { Used = true; }
/// \brief Mark the declaration used, in the sense of odr-use.
///
diff --git a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h
index bf53cf09bef..72af48c2727 100644
--- a/clang/include/clang/Serialization/ASTWriter.h
+++ b/clang/include/clang/Serialization/ASTWriter.h
@@ -565,17 +565,6 @@ public:
/// decl.
const Decl *getFirstLocalDecl(const Decl *D);
- /// \brief Is this a local declaration (that is, one that will be written to
- /// our AST file)? This is the case for declarations that are neither imported
- /// from another AST file nor predefined.
- bool IsLocalDecl(const Decl *D) {
- if (D->isFromASTFile())
- return false;
- auto I = DeclIDs.find(D);
- return (I == DeclIDs.end() ||
- I->second >= serialization::NUM_PREDEF_DECL_IDS);
- };
-
/// \brief Emit a reference to a declaration.
void AddDeclRef(const Decl *D, RecordDataImpl &Record);
OpenPOWER on IntegriCloud