From 56603ef7b2799a8036efb9d6755d30e44951e6a3 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 7 Sep 2010 19:38:13 +0000 Subject: Have Sema check for validity of CGString literal instead of asserting in IRGen. Fixes radar 8390459. llvm-svn: 113253 --- clang/lib/CodeGen/CodeGenModule.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index d125b37..6a527a2 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1498,15 +1498,6 @@ GetConstantCFStringEntry(llvm::StringMap &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]; -- cgit v1.1