Clarify that DIEString does not keep a copy of the string.
authorDevang Patel <dpatel@apple.com>
Wed, 2 Dec 2009 15:25:16 +0000 (15:25 +0000)
committerDevang Patel <dpatel@apple.com>
Wed, 2 Dec 2009 15:25:16 +0000 (15:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90318 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DIE.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index dc6a70a6bd6a3cf8c199158e3608031a4bdfc5ba..cad8b89550246b67883c7e177771352791108b2b 100644 (file)
@@ -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;
index dcb5900fe90729897528bdb850d1de39b289c330..da2b9c3682f4a9b197e1dd9eeb0e9b8d3e548bc5 100644 (file)
@@ -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);