diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-02-23 00:52:04 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-02-23 00:52:04 +0000 |
| commit | 652d18e37c19f041a05a5d38585984c3a9bf9b57 (patch) | |
| tree | e0c50ec5e40487d82af657b0f999fe243cf0e4f7 /llvm/lib/Bitcode/Writer/SerializeAPInt.cpp | |
| parent | 2f2ff159a584bc9e7fdeb4863e6a19e14bac8255 (diff) | |
| download | llvm-652d18e37c19f041a05a5d38585984c3a9bf9b57.zip llvm-652d18e37c19f041a05a5d38585984c3a9bf9b57.tar.gz llvm-652d18e37c19f041a05a5d38585984c3a9bf9b57.tar.bz2 | |
Patch from Argiris Kirtzidis:
The patch fixes some debug assertions that the msvcrt throws:
1)
- if (isprint(value) && value < 256) {
+ if (value < 256 && isprint(value)) {
isprint() does an assertion check of its own for value < 256; check value before calling it to prevent it.
2)
- Stmt->Names.push_back(std::string(&data[0], data.size()));
+ if (data.size() == 0)
+ Stmt->Names.push_back(std::string());
+ else
+ Stmt->Names.push_back(std::string(&data[0], data.size()));
If data.size() == 0 then data[0] throws "out of range" assertion.
llvm-svn: 47512
Diffstat (limited to 'llvm/lib/Bitcode/Writer/SerializeAPInt.cpp')
0 files changed, 0 insertions, 0 deletions
