[llvm-commits] [llvm] r115378 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Devang Patel
dpatel at apple.com
Fri Oct 1 16:31:40 PDT 2010
Author: dpatel
Date: Fri Oct 1 18:31:40 2010
New Revision: 115378
URL: http://llvm.org/viewvc/llvm-project?rev=115378&view=rev
Log:
Add support to let FE mark explict methods as explict in debug info.
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=115378&r1=115377&r2=115378&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Fri Oct 1 18:31:40 2010
@@ -54,7 +54,8 @@
FlagAppleBlock = 1 << 3,
FlagBlockByrefStruct = 1 << 4,
FlagVirtual = 1 << 5,
- FlagArtificial = 1 << 6
+ FlagArtificial = 1 << 6,
+ FlagExplicit = 1 << 7
};
protected:
const MDNode *DbgNode;
@@ -414,6 +415,13 @@
return false;
return (getUnsignedField(14) & FlagProtected) != 0;
}
+ /// isExplicit - Return true if this subprogram is marked as explicit.
+ bool isExplicit() const {
+ if (getVersion() <= llvm::LLVMDebugVersion8)
+ return false;
+ return (getUnsignedField(14) & FlagExplicit) != 0;
+ }
+
unsigned isOptimized() const;
StringRef getFilename() const {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=115378&r1=115377&r2=115378&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Oct 1 18:31:40 2010
@@ -1081,6 +1081,8 @@
else
addUInt(ElemDie, dwarf::DW_AT_accessibility, dwarf::DW_FORM_flag,
dwarf::DW_ACCESS_public);
+ if (SP.isExplicit())
+ addUInt(ElemDie, dwarf::DW_AT_explicit, dwarf::DW_FORM_flag, 1);
}
else if (Element.isVariable()) {
DIVariable DV(Element);
More information about the llvm-commits
mailing list