summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-12-02 15:25:16 +0000
committerDevang Patel <dpatel@apple.com>2009-12-02 15:25:16 +0000
commit69f57b1f41c818c5a89c40fd9a4bdca6a76ea934 (patch)
tree7b3bc0dd78de83bb3acad59f6c28274fee10f04f /lib/CodeGen
parent9ff5a23186f8761d9e5b4b5adf6fae9ce7d63860 (diff)
downloadllvm-69f57b1f41c818c5a89c40fd9a4bdca6a76ea934.tar.gz
llvm-69f57b1f41c818c5a89c40fd9a4bdca6a76ea934.tar.bz2
llvm-69f57b1f41c818c5a89c40fd9a4bdca6a76ea934.tar.xz
Clarify that DIEString does not keep a copy of the string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DIE.h2
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIE.h b/lib/CodeGen/AsmPrinter/DIE.h
index dc6a70a6bd..cad8b89550 100644
--- a/lib/CodeGen/AsmPrinter/DIE.h
+++ b/lib/CodeGen/AsmPrinter/DIE.h
@@ -274,7 +274,7 @@ namespace llvm {
};
//===--------------------------------------------------------------------===//
- /// DIEString - A string value DIE.
+ /// DIEString - A string value DIE. This DIE keeps string reference only.
///
class DIEString : public DIEValue {
const StringRef Str;
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index dcb5900fe9..da2b9c3682 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -330,8 +330,8 @@ void DwarfDebug::addSInt(DIE *Die, unsigned Attribute,
Die->addValue(Attribute, Form, Value);
}
-/// addString - Add a string attribute data and value.
-///
+/// addString - Add a string attribute data and value. DIEString only
+/// keeps string reference.
void DwarfDebug::addString(DIE *Die, unsigned Attribute, unsigned Form,
const StringRef String) {
DIEValue *Value = new DIEString(String);