aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-04 04:40:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-04 04:40:17 +0000
commitc855ce7ab97aa25c609a5f83e19b27289fede21a (patch)
tree282a2e2a5550be0fd1bddafad0a138b451e21fe8 /lib/AST/Decl.cpp
parent98735a91d53296a76fbcfc00328f6b9aa8bc6cef (diff)
Add hasExternalLinkageUncached back with the test that Richard provided, but
keep the call at the current location. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 9505d299ab..bf807aeb1d 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -866,6 +866,10 @@ bool NamedDecl::isLinkageValid() const {
Linkage(CachedLinkage);
}
+bool NamedDecl::hasExternalLinkageUncached() const {
+ return getLVForDecl(this, LVForExplicitValue).getLinkage() == ExternalLinkage;
+}
+
Linkage NamedDecl::getLinkage() const {
if (HasCachedLinkage)
return Linkage(CachedLinkage);