forked from OSchip/llvm-project
Fixed expression parser handling of empty strings.
<rdar://problem/12977827> llvm-svn: 180215
This commit is contained in:
parent
75c3036d4b
commit
76ee3e7e1c
|
@ -1465,6 +1465,11 @@ IRForTarget::MaterializeInitializer (uint8_t *data, Constant *initializer)
|
|||
}
|
||||
return true;
|
||||
}
|
||||
else if (isa<ConstantAggregateZero>(initializer))
|
||||
{
|
||||
memset(data, 0, m_target_data->getTypeStoreSize(initializer_type));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,9 @@ class CStringsTestCase(TestBase):
|
|||
substrs = ['(char *) $', ' = 0x',
|
||||
'hello'])
|
||||
|
||||
self.expect("p (int)strlen(\"\")",
|
||||
substrs = ['(int) $', ' = 0'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
import atexit
|
||||
lldb.SBDebugger.Initialize()
|
||||
|
|
Loading…
Reference in New Issue