aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/GCStrategy.cpp
diff options
context:
space:
mode:
authorGordon Henriksen <gordonhenriksen@mac.com>2008-08-17 16:18:50 +0000
committerGordon Henriksen <gordonhenriksen@mac.com>2008-08-17 16:18:50 +0000
commit46c16c5696d6c94551ffc77e88ed1ae857884b55 (patch)
tree7f74ce030ec8d7b73fe16937ffc3bf37f1e90ea2 /lib/CodeGen/GCStrategy.cpp
parent8802413f34640ab59d331aad7c2ec28cd22788d9 (diff)
downloadexternal_llvm-46c16c5696d6c94551ffc77e88ed1ae857884b55.tar.gz
external_llvm-46c16c5696d6c94551ffc77e88ed1ae857884b55.tar.bz2
external_llvm-46c16c5696d6c94551ffc77e88ed1ae857884b55.zip
Don't instantiate GC metadata for declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54895 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/GCStrategy.cpp')
-rw-r--r--lib/CodeGen/GCStrategy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/GCStrategy.cpp b/lib/CodeGen/GCStrategy.cpp
index 629a2e13de..f5cb9ab631 100644
--- a/lib/CodeGen/GCStrategy.cpp
+++ b/lib/CodeGen/GCStrategy.cpp
@@ -144,7 +144,7 @@ bool LowerIntrinsics::doInitialization(Module &M) {
CollectorModuleMetadata *CMM = getAnalysisToUpdate<CollectorModuleMetadata>();
assert(CMM && "LowerIntrinsics didn't require CollectorModuleMetadata!?");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
- if (I->hasCollector())
+ if (!I->isDeclaration() && I->hasCollector())
CMM->get(*I); // Instantiate the Collector.
bool MadeChange = false;