summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-08-02 22:51:46 +0000
committerDevang Patel <dpatel@apple.com>2010-08-02 22:51:46 +0000
commit33a2cdf3f9f4b4c41e6383194b24e5c4281324cf (patch)
tree53d542a157d2bd652f448d3295deae3df7a8e1eb
parent04d50f5d13e902167da9f4a521e2be5f1bd51e27 (diff)
downloadbcm5719-llvm-33a2cdf3f9f4b4c41e6383194b24e5c4281324cf.tar.gz
bcm5719-llvm-33a2cdf3f9f4b4c41e6383194b24e5c4281324cf.zip
Add explicit constructors. Patch by Renato Golin.
llvm-svn: 110072
-rw-r--r--llvm/include/llvm/Analysis/DebugInfo.h11
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp15
2 files changed, 26 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/DebugInfo.h b/llvm/include/llvm/Analysis/DebugInfo.h
index f6e78320b3e..488c48acaac 100644
--- a/llvm/include/llvm/Analysis/DebugInfo.h
+++ b/llvm/include/llvm/Analysis/DebugInfo.h
@@ -36,6 +36,12 @@ namespace llvm {
class LLVMContext;
class raw_ostream;
+ class DIFile;
+ class DISubprogram;
+ class DILexicalBlock;
+ class DIVariable;
+ class DIType;
+
/// DIDescriptor - A thin wraper around MDNode to access encoded debug info.
/// This should not be stored in a container, because underly MDNode may
/// change in certain situations.
@@ -61,6 +67,11 @@ namespace llvm {
public:
explicit DIDescriptor() : DbgNode(0) {}
explicit DIDescriptor(const MDNode *N) : DbgNode(N) {}
+ explicit DIDescriptor(const DIFile F);
+ explicit DIDescriptor(const DISubprogram F);
+ explicit DIDescriptor(const DILexicalBlock F);
+ explicit DIDescriptor(const DIVariable F);
+ explicit DIDescriptor(const DIType F);
bool Verify() const { return DbgNode != 0; }
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index 472669c770a..77e0ece04b9 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/lib/Analysis/DebugInfo.cpp
@@ -32,6 +32,21 @@ using namespace llvm::dwarf;
// DIDescriptor
//===----------------------------------------------------------------------===//
+DIDescriptor::DIDescriptor(const DIFile F) : DbgNode(F.DbgNode) {
+}
+
+DIDescriptor::DIDescriptor(const DISubprogram F) : DbgNode(F.DbgNode) {
+}
+
+DIDescriptor::DIDescriptor(const DILexicalBlock F) : DbgNode(F.DbgNode) {
+}
+
+DIDescriptor::DIDescriptor(const DIVariable F) : DbgNode(F.DbgNode) {
+}
+
+DIDescriptor::DIDescriptor(const DIType F) : DbgNode(F.DbgNode) {
+}
+
StringRef
DIDescriptor::getStringField(unsigned Elt) const {
if (DbgNode == 0)
OpenPOWER on IntegriCloud