diff options
| author | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-08-17 16:18:50 +0000 |
|---|---|---|
| committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2008-08-17 16:18:50 +0000 |
| commit | e431adbfc7c444f6bc0d100705e8e467d7be1680 (patch) | |
| tree | 549d0d6ffe63d897ca0afd997903c02e12bd2bcf /llvm/lib/CodeGen/GCMetadata.cpp | |
| parent | a337916c6cb1975dd4da98b1f0cfdb5edfa00eef (diff) | |
| download | bcm5719-llvm-e431adbfc7c444f6bc0d100705e8e467d7be1680.tar.gz bcm5719-llvm-e431adbfc7c444f6bc0d100705e8e467d7be1680.zip | |
Don't instantiate GC metadata for declarations.
llvm-svn: 54895
Diffstat (limited to 'llvm/lib/CodeGen/GCMetadata.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/GCMetadata.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/GCMetadata.cpp b/llvm/lib/CodeGen/GCMetadata.cpp index c02a73b7080..0b5c6f0662c 100644 --- a/llvm/lib/CodeGen/GCMetadata.cpp +++ b/llvm/lib/CodeGen/GCMetadata.cpp @@ -99,7 +99,9 @@ getOrCreateCollector(const Module *M, const std::string &Name) { } CollectorMetadata &CollectorModuleMetadata::get(const Function &F) { + assert(!F.isDeclaration() && "Can only get GCFunctionInfo for a definition!"); assert(F.hasCollector()); + function_map_type::iterator I = Map.find(&F); if (I != Map.end()) return *I->second; |

