Added a parameter to control whether Constant::getStringValue() would chop

off the result string at the first null terminator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26704 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2006-03-10 23:52:03 +00:00
parent 7907b6950b
commit 0937103368
3 changed files with 12 additions and 6 deletions

View File

@@ -93,8 +93,10 @@ public:
/// getStringValue - Turn an LLVM constant pointer that eventually points to a
/// global into a string value. Return an empty string if we can't do it.
/// Parameter Chop determines if the result is chopped at the first null
/// terminator.
///
std::string getStringValue(unsigned Offset = 0);
std::string getStringValue(bool Chop = true, unsigned Offset = 0);
};
} // End llvm namespace