[LLVMdev] [llvm-commits][PATHCH] Bug 12530 - llvm-link dropping debug-information for local
Jaemin Park
jm.j.park at samsung.com
Mon Jun 4 18:49:48 PDT 2012
When linking .ll files with llvm-link or llvm-ld, the debug information is
corrupted.
As my investigation, alloca instruction, used to hold the debug
information, nullifies the debug meta information
The attachments is the patch for it.
Index: lib/Transforms/Utils/ValueMapper.cpp
===================================================================
--- lib/Transforms/Utils/ValueMapper.cpp (revision 157974)
+++ lib/Transforms/Utils/ValueMapper.cpp (working copy)
@@ -85,6 +85,10 @@
// No operands needed remapping. Use an identity mapping.
return const_cast<Value*>(V);
}
+
+ // Alloca instruction is used to identify the holding information in
llvm.dbg.declare
+ if (isa<AllocaInst>(V))
+ return const_cast<Value*>(V);
// Okay, this either must be a constant (which may or may not be
mappable) or
// is something that is not in the mapping table.
Sincerely yours,
Jaemin Park
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120605/030ffd16/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120605/030ffd16/attachment.obj>
More information about the llvm-dev
mailing list