diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-13 00:12:11 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-13 00:12:11 +0000 |
| commit | 181e3ecc0907ae0103586a9f4db52241995a8267 (patch) | |
| tree | 13bc622533688becae4d9d241c31698586c577f7 /lib/CodeGen/CodeGenTBAA.cpp | |
| parent | 3c5f4b649f7a8ed51f9291c494a1b6e43f69d386 (diff) | |
| download | clang-181e3ecc0907ae0103586a9f4db52241995a8267.tar.gz clang-181e3ecc0907ae0103586a9f4db52241995a8267.tar.bz2 clang-181e3ecc0907ae0103586a9f4db52241995a8267.tar.xz | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTBAA.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenTBAA.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenTBAA.cpp b/lib/CodeGen/CodeGenTBAA.cpp index 5ff1560a48..3f0eaee536 100644 --- a/lib/CodeGen/CodeGenTBAA.cpp +++ b/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 |
