It is possible that main input file does not have any symbol with debug info. To  handle this edge case, always create main compile unit first.
This fixes PR 4228.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73520 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index de65580..8f3368e 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -111,7 +111,9 @@
   void EmitDeclare(const VarDecl *decl, unsigned Tag, llvm::Value *AI,
                    CGBuilderTy &Builder);
   
-  
+  /// createCompileUnit - Create a new unit for the given file.
+  llvm::DICompileUnit createCompileUnit(const char *FileName, bool isMain);
+
   /// getOrCreateCompileUnit - Get the compile unit from the cache or create a
   /// new one if necessary.
   llvm::DICompileUnit getOrCreateCompileUnit(SourceLocation Loc);