aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenTBAA.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-05-13 00:12:11 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-05-13 00:12:11 +0000
commit3ae00052cd260a7ed753ec2e1338d22119d25595 (patch)
treed9bc7cf2ffc60eba2f2ccaf8d6c08f5d2a9d908f /clang/lib/CodeGen/CodeGenTBAA.cpp
parent0e4676e1f53b7a463cc4c4e9af87ee91c86d2a62 (diff)
downloadllvm-3ae00052cd260a7ed753ec2e1338d22119d25595.zip
llvm-3ae00052cd260a7ed753ec2e1338d22119d25595.tar.gz
llvm-3ae00052cd260a7ed753ec2e1338d22119d25595.tar.bz2
Cleanup handling of UniqueExternalLinkage.
This patch renames getLinkage to getLinkageInternal. Only code that needs to handle UniqueExternalLinkage specially should call this. Linkage, as defined in the c++ standard, is provided by getFormalLinkage. It maps UniqueExternalLinkage to ExternalLinkage. Most places in the compiler actually want isExternallyVisible, which handles UniqueExternalLinkage as internal. llvm-svn: 181677
Diffstat (limited to 'clang/lib/CodeGen/CodeGenTBAA.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenTBAA.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenTBAA.cpp b/clang/lib/CodeGen/CodeGenTBAA.cpp
index 5ff1560..3f0eaee 100644
--- a/clang/lib/CodeGen/CodeGenTBAA.cpp
+++ b/clang/lib/CodeGen/CodeGenTBAA.cpp
@@ -162,8 +162,7 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
// on their mangled names, if they're external.
// TODO: Is there a way to get a program-wide unique name for a
// decl with local linkage or no linkage?
- if (Features.CPlusPlus &&
- ETy->getDecl()->getLinkage() != ExternalLinkage)
+ if (Features.CPlusPlus && !ETy->getDecl()->isExternallyVisible())
return MetadataCache[Ty] = getChar();
// TODO: This is using the RTTI name. Is there a better way to get