diff options
author | Chris Lattner <sabre@nondot.org> | 2008-06-28 05:33:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-06-28 05:33:32 +0000 |
commit | b746b82113df707df9555450991eab75b18ffa1b (patch) | |
tree | 1035bbcde0380c7ffc3c3957e0956ad9c47d62c3 /include/llvm/Analysis | |
parent | 3284d42c17a7f95a07b73e414b50b3d0e10733a1 (diff) | |
download | external_llvm-b746b82113df707df9555450991eab75b18ffa1b.zip external_llvm-b746b82113df707df9555450991eab75b18ffa1b.tar.gz external_llvm-b746b82113df707df9555450991eab75b18ffa1b.tar.bz2 |
Add back the capability to include nul characters in strings with
GetConstantStringInfo. This will hopefully restore llvm-gcc to
happy bootstrap land.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/ValueTracking.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index 22a605d..1003269 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -76,8 +76,12 @@ namespace llvm { /// GetConstantStringInfo - This function computes the length of a /// null-terminated C string pointed to by V. If successful, it returns true - /// and returns the string in Str. If unsuccessful, it returns false. - bool GetConstantStringInfo(Value *V, std::string &Str, uint64_t Offset = 0); + /// and returns the string in Str. If unsuccessful, it returns false. If + /// StopAtNul is set to true (the default), the returned string is truncated + /// by a nul character in the global. If StopAtNul is false, the nul + /// character is included in the result string. + bool GetConstantStringInfo(Value *V, std::string &Str, uint64_t Offset = 0, + bool StopAtNul = true); } // end namespace llvm #endif |