[cfe-commits] r92109 - /cfe/trunk/lib/CodeGen/CGRTTI.cpp
Mike Stump
mrs at apple.com
Wed Dec 23 17:10:27 PST 2009
Author: mrs
Date: Wed Dec 23 19:10:27 2009
New Revision: 92109
URL: http://llvm.org/viewvc/llvm-project?rev=92109&view=rev
Log:
Fix recent regression caught by g++.old-deja/g++.mike/eh19.C.
Modified:
cfe/trunk/lib/CodeGen/CGRTTI.cpp
Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=92109&r1=92108&r2=92109&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Wed Dec 23 19:10:27 2009
@@ -607,6 +607,26 @@
return llvm::GlobalValue::WeakODRLinkage;
}
+ if (const FunctionType *FT = dyn_cast<FunctionType>(Ty)) {
+ if (getTypeInfoLinkage(FT->getResultType())
+ == llvm::GlobalValue::InternalLinkage)
+ return llvm::GlobalValue::InternalLinkage;
+
+ if (const FunctionProtoType *FPT = dyn_cast<FunctionProtoType>(Ty)) {
+ for (unsigned i = 0; i < FPT->getNumArgs(); ++i)
+ if (getTypeInfoLinkage(FPT->getArgType(i))
+ == llvm::GlobalValue::InternalLinkage)
+ return llvm::GlobalValue::InternalLinkage;
+ for (unsigned i = 0; i < FPT->getNumExceptions(); ++i)
+ if (getTypeInfoLinkage(FPT->getExceptionType(i))
+ == llvm::GlobalValue::InternalLinkage)
+ return llvm::GlobalValue::InternalLinkage;
+ }
+
+ return llvm::GlobalValue::WeakODRLinkage;
+ }
+
+ // FIXME: We need to add code to handle all types.
assert(false && "Unhandled type!");
return llvm::GlobalValue::WeakODRLinkage;
}
More information about the cfe-commits
mailing list