mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 20:10:50 +08:00
We don't really handle printing embedded NULs in strings, but if we were to, we would need to have this logic inside the StringPrinter. So, add it.. For, you know, one day in the future where we might want to handle embedded NULs in strings...
llvm-svn: 224537
This commit is contained in:
@@ -149,6 +149,9 @@ GetPrintableImpl<StringElementType::ASCII> (uint8_t* buffer, uint8_t* buffer_end
|
||||
|
||||
switch (*buffer)
|
||||
{
|
||||
case 0:
|
||||
retval = {"\\0",2};
|
||||
break;
|
||||
case '\a':
|
||||
retval = {"\\a",2};
|
||||
break;
|
||||
@@ -250,6 +253,9 @@ GetPrintableImpl<StringElementType::UTF8> (uint8_t* buffer, uint8_t* buffer_end,
|
||||
{
|
||||
switch (codepoint)
|
||||
{
|
||||
case 0:
|
||||
retval = {"\\0",2};
|
||||
break;
|
||||
case '\a':
|
||||
retval = {"\\a",2};
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user