diff options
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; |

