Merging r196157:
------------------------------------------------------------------------
r196157 | mren | 2013-12-02 13:26:02 -0800 (Mon, 02 Dec 2013) | 4 lines
Debug info metadata without a version or with an outdated version will be
dropped. Add a version here to avoid that.
------------------------------------------------------------------------
llvm-svn: 196759
diff --git a/dragonegg/src/Debug.cpp b/dragonegg/src/Debug.cpp
index e81f038..9db6bec 100644
--- a/dragonegg/src/Debug.cpp
+++ b/dragonegg/src/Debug.cpp
@@ -976,6 +976,10 @@
/// initialization is done.
void DebugInfo::Initialize() {
+ // Debug info metadata without a version or with an outdated version will be
+ // dropped. Add a version here to avoid that.
+ M.addModuleFlag(llvm::Module::Error, "Debug Info Version",
+ llvm::DEBUG_METADATA_VERSION);
// Each input file is encoded as a separate compile unit in LLVM
// debugging information output. However, many target specific tool chains
// prefer to encode only one compile unit in an object file. In this