summaryrefslogtreecommitdiff
path: root/include/llvm/Constant.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-10 23:52:03 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-10 23:52:03 +0000
commit0937103368992af8d3d8032d31a7d152aeae32d5 (patch)
tree7c696840b9a28e8b6f4449cf156342120d280f0e /include/llvm/Constant.h
parent7907b6950bd6c7b1dc2b19930ff81371013000f8 (diff)
downloadllvm-0937103368992af8d3d8032d31a7d152aeae32d5.tar.gz
llvm-0937103368992af8d3d8032d31a7d152aeae32d5.tar.bz2
llvm-0937103368992af8d3d8032d31a7d152aeae32d5.tar.xz
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
Diffstat (limited to 'include/llvm/Constant.h')
-rw-r--r--include/llvm/Constant.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h
index 13b4cb3fb8..4411540ae5 100644
--- a/include/llvm/Constant.h
+++ b/include/llvm/Constant.h
@@ -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