summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-10-01 23:31:40 +0000
committerDevang Patel <dpatel@apple.com>2010-10-01 23:31:40 +0000
commite1c714647c8a0d05cfa5a1ae71b454d586e56456 (patch)
tree6804e4ffecb66dab586852a23e01997bf461f35f
parent00915353614f900f4e992443d72561d2fd73b42f (diff)
downloadbcm5719-llvm-e1c714647c8a0d05cfa5a1ae71b454d586e56456.tar.gz
bcm5719-llvm-e1c714647c8a0d05cfa5a1ae71b454d586e56456.zip
Add support to let FE mark explict methods as explict in debug info.
llvm-svn: 115378
-rw-r--r--llvm/include/llvm/Analysis/DebugInfo.h10
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
2 files changed, 11 insertions, 1 deletions
diff --git a/llvm/include/llvm/Analysis/DebugInfo.h b/llvm/include/llvm/Analysis/DebugInfo.h
index d76271a9951..4189f5d9b84 100644
--- a/llvm/include/llvm/Analysis/DebugInfo.h
+++ b/llvm/include/llvm/Analysis/DebugInfo.h
@@ -54,7 +54,8 @@ namespace llvm {
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 @@ namespace llvm {
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 {
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index e6ac0ebc2da..ddda1844070 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1081,6 +1081,8 @@ void DwarfDebug::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
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);
OpenPOWER on IntegriCloud