summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRTTI.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2014-03-10 22:27:33 +0000
committerJohn McCall <rjmccall@apple.com>2014-03-10 22:27:33 +0000
commit82ff42d42a852633ccad86b23c01c573358699ff (patch)
treec2758006f0f4d34158d286c4ac025e2cec02ae20 /lib/CodeGen/CGRTTI.cpp
parent815fcf90db0cd6c45710bad63b8ef554b4f9ab45 (diff)
downloadclang-82ff42d42a852633ccad86b23c01c573358699ff.tar.gz
clang-82ff42d42a852633ccad86b23c01c573358699ff.tar.bz2
clang-82ff42d42a852633ccad86b23c01c573358699ff.tar.xz
RTTI symbols for visible local types may need weak linkage.
Previously, we would always emit them with internal linkage, but with hidden visibility when the function was hidden, which is an illegal combination, which could lead LLVM to actually emit them as strong hidden symbols with hilarious results. rdar://16265084 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203503 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r--lib/CodeGen/CGRTTI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp
index 455ee972f5..8851209d08 100644
--- a/lib/CodeGen/CGRTTI.cpp
+++ b/lib/CodeGen/CGRTTI.cpp
@@ -332,11 +332,11 @@ getTypeInfoLinkage(CodeGenModule &CGM, QualType Ty) {
switch (Ty->getLinkage()) {
case NoLinkage:
- case VisibleNoLinkage:
case InternalLinkage:
case UniqueExternalLinkage:
return llvm::GlobalValue::InternalLinkage;
+ case VisibleNoLinkage:
case ExternalLinkage:
if (!CGM.getLangOpts().RTTI) {
// RTTI is not enabled, which means that this type info struct is going