OSDN Git Service

dont specialize weak functions and the like
authorNuno Lopes <nunoplopes@sapo.pt>
Wed, 8 Oct 2008 18:45:59 +0000 (18:45 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Wed, 8 Oct 2008 18:45:59 +0000 (18:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57305 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/PartialSpecialization.cpp

index da127cb..006da59 100644 (file)
@@ -108,7 +108,7 @@ bool PartSpec::runOnModule(Module &M) {
   bool Changed = false;
   for (Module::iterator I = M.begin(); I != M.end(); ++I) {
     Function &F = *I;
-    if (F.isDeclaration()) continue;
+    if (F.isDeclaration() || F.mayBeOverridden()) continue;
     SmallVector<int, 6> interestingArgs;
     scanForInterest(F, interestingArgs);