summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-09-07 19:38:13 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-09-07 19:38:13 +0000
commit56603ef7b2799a8036efb9d6755d30e44951e6a3 (patch)
tree64adf8df845a35af0c05ff87f1c71682661b0f2d /clang/lib/CodeGen/CodeGenModule.cpp
parenta74fa15f320fe999a682eb81fd902478aea3351b (diff)
downloadbcm5719-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.cpp9
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];
OpenPOWER on IntegriCloud