[dragonegg] r196157 - Debug info metadata without a version or with an outdated version will be

Manman Ren manman.ren at gmail.com
Mon Dec 2 13:26:03 PST 2013


Author: mren
Date: Mon Dec  2 15:26:02 2013
New Revision: 196157

URL: http://llvm.org/viewvc/llvm-project?rev=196157&view=rev
Log:
Debug info metadata without a version or with an outdated version will be
dropped. Add a version here to avoid that.


Modified:
    dragonegg/trunk/src/Debug.cpp

Modified: dragonegg/trunk/src/Debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Debug.cpp?rev=196157&r1=196156&r2=196157&view=diff
==============================================================================
--- dragonegg/trunk/src/Debug.cpp (original)
+++ dragonegg/trunk/src/Debug.cpp Mon Dec  2 15:26:02 2013
@@ -976,6 +976,10 @@ DIType DebugInfo::getOrCreateType(tree t
 /// 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





More information about the llvm-commits mailing list