[LLVMbugs] [Bug 12533] New: Debug info corresponding to extern variable is not generated in clang
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Apr 12 04:44:31 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12533
Bug #: 12533
Summary: Debug info corresponding to extern variable is not
generated in clang
Product: clang
Version: 3.0
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: karthikthecool at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8374
--> http://llvm.org/bugs/attachment.cgi?id=8374
IR and assembly file generated for above code
Debug info corresponding to extern variable is not generated in clang. For e.g.
in the code below-
extern int externalVar;
int globalVar;
int fun()
{
int ret = 0;
externalVar = 0;
globalVar =1;
ret = externalVar + globalVar;
return ret;
}
Gcc generates debug info corresponding to externalVar as -
.long .LASF0 # DW_AT_name: "externalVar"
.byte 0x1 # DW_AT_decl_file
(/home/karthik.b/P4_workspace/SISO_PROFILE_BADA_SLP_KARTHIK/SHP_TASK/SWP1/OSP/OSP3.0_LLVM/llvm_src/projects/clang-tests/gcc-testsuite/src/g++.dg/debug/dwarf2/redeclaration-1.C)
.byte 0x15 # DW_AT_decl_line
.long 0x5a # DW_AT_type
.byte 0x1 # DW_AT_external
.byte 0x1 # DW_AT_declaration
This info is not generated in case of clang.
IR Generated also doesn't contain debug info corresponding to externalVar.
Please find attached the IR and assembly file for the above code for LLVM and
assembly file generated in case of gcc which has externalVar debug info.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list