diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-07 19:38:13 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-09-07 19:38:13 +0000 |
| commit | 56603ef7b2799a8036efb9d6755d30e44951e6a3 (patch) | |
| tree | 64adf8df845a35af0c05ff87f1c71682661b0f2d /clang/lib/CodeGen/CodeGenModule.cpp | |
| parent | a74fa15f320fe999a682eb81fd902478aea3351b (diff) | |
| download | bcm5719-llvm-56603ef7b2799a8036efb9d6755d30e44951e6a3.tar.gz bcm5719-llvm-56603ef7b2799a8036efb9d6755d30e44951e6a3.zip | |
Have Sema check for validity of CGString literal
instead of asserting in IRGen. Fixes radar 8390459.
llvm-svn: 113253
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d125b370a07..6a527a229e4 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1498,15 +1498,6 @@ GetConstantCFStringEntry(llvm::StringMap<llvm::Constant*> &Map, &ToPtr, ToPtr + NumBytes, strictConversion); - // Check for conversion failure. - if (Result != conversionOK) { - // FIXME: Have Sema::CheckObjCString() validate the UTF-8 string and remove - // this duplicate code. - assert(Result == sourceIllegal && "UTF-8 to UTF-16 conversion failed"); - StringLength = NumBytes; - return Map.GetOrCreateValue(String); - } - // ConvertUTF8toUTF16 returns the length in ToPtr. StringLength = ToPtr - &ToBuf[0]; |

