summaryrefslogtreecommitdiffstats
path: root/llvm/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
commite431adbfc7c444f6bc0d100705e8e467d7be1680 (patch)
tree549d0d6ffe63d897ca0afd997903c02e12bd2bcf /llvm/lib/CodeGen/GCStrategy.cpp
parenta337916c6cb1975dd4da98b1f0cfdb5edfa00eef (diff)
downloadbcm5719-llvm-e431adbfc7c444f6bc0d100705e8e467d7be1680.tar.gz
bcm5719-llvm-e431adbfc7c444f6bc0d100705e8e467d7be1680.zip
Don't instantiate GC metadata for declarations.
llvm-svn: 54895
Diffstat (limited to 'llvm/lib/CodeGen/GCStrategy.cpp')
-rw-r--r--llvm/lib/CodeGen/GCStrategy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/GCStrategy.cpp b/llvm/lib/CodeGen/GCStrategy.cpp
index 629a2e13dee..f5cb9ab6312 100644
--- a/llvm/lib/CodeGen/GCStrategy.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud