From: Devang Patel Date: Wed, 2 Dec 2009 15:25:16 +0000 (+0000) Subject: Clarify that DIEString does not keep a copy of the string. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=69f57b1f41c818c5a89c40fd9a4bdca6a76ea934;p=oota-llvm.git 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 --- diff --git a/lib/CodeGen/AsmPrinter/DIE.h b/lib/CodeGen/AsmPrinter/DIE.h index dc6a70a6bd6..cad8b895502 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 dcb5900fe90..da2b9c3682f 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);