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 | 418b6e875f844261064c5dd43e76cb401117ac74 (patch) | |
tree | 7f74ce030ec8d7b73fe16937ffc3bf37f1e90ea2 /lib/CodeGen/GCMetadata.cpp | |
parent | 3813bcaa89a12bc305fe41019fcc84dafa364e07 (diff) |
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/GCMetadata.cpp')
-rw-r--r-- | lib/CodeGen/GCMetadata.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/GCMetadata.cpp b/lib/CodeGen/GCMetadata.cpp index c02a73b7080..0b5c6f0662c 100644 --- a/lib/CodeGen/GCMetadata.cpp +++ b/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; |