Remove attribution from file headers, per discussion on llvmdev.
[oota-llvm.git] / lib / Transforms / IPO / InlineSimple.cpp
index 38bf0610b3872e84c2b5792cef96db1b77facc24..d72edf84805ee0707f441ad504f95314823c7cc0 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -59,6 +59,10 @@ bool SimpleInliner::doInitialization(CallGraph &CG) {
   if (GV == 0)
     return false;
 
+  // Don't crash on invalid code
+  if (!GV->hasInitializer())
+    return false;
+  
   const ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer());
   
   if (InitList == 0)