Adrian Prantl d963a7c398 Make CompilerType::getBitSize() / getByteSize() return an optional result. NFC
The code in LLDB assumes that CompilerType and friends use the size 0
as a sentinel value to signal an error. This works for C++, where no
zero-sized type exists, but in many other programming languages
(including I believe C) types of size zero are possible and even
common. This is a particular pain point in swift-lldb, where extra
code exists to double-check that a type is *really* of size zero and
not an error at various locations.

To remedy this situation, this patch starts by converting
CompilerType::getBitSize() and getByteSize() to return an optional
result. To avoid wasting space, I hand-rolled my own optional data
type assuming that no type is larger than what fits into 63
bits. Follow-up patches would make similar changes to the ValueObject
hierarchy.

rdar://problem/47178964

Differential Revision: https://reviews.llvm.org/D56688

llvm-svn: 351214
2019-01-15 18:07:52 +00:00
2019-01-15 15:10:32 +00:00
2019-01-15 15:10:32 +00:00
2019-01-15 15:10:32 +00:00
2019-01-15 15:10:32 +00:00
2019-01-15 15:10:32 +00:00
2019-01-15 15:10:32 +00:00
2019-01-15 15:10:32 +00:00
2019-01-15 17:54:42 +00:00
2019-01-15 15:10:32 +00:00

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.

Description
No description provided
Readme 5.2 GiB
Languages
LLVM 41.5%
C++ 31.7%
C 13%
Assembly 9.1%
MLIR 1.5%
Other 2.8%