diff options
author | Adrian Prantl <aprantl@apple.com> | 2015-02-02 18:31:58 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2015-02-02 18:31:58 +0000 |
commit | 9013c4b3b11d6173fee5e49f895ffcde056ecaf6 (patch) | |
tree | 12631d765f668d2074f06718f01ae0107b0a8ed6 /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | |
parent | 71db64258db6d6ae80f4b0dc3bc17bc4596c29a8 (diff) | |
download | bcm5719-llvm-9013c4b3b11d6173fee5e49f895ffcde056ecaf6.tar.gz bcm5719-llvm-9013c4b3b11d6173fee5e49f895ffcde056ecaf6.zip |
Debug Info: Relax assertion in isUnsignedDIType() to allow floats to be
described by integer constants. This is a bit ugly, but if the source
language allows arbitrary type casting, the debug info must follow suit.
For example:
void foo() {
float a;
*(int *)&a = 0;
}
For the curious: SROA replaces the float alloca with an i32 alloca, which
is then optimized away and described via dbg.value(i32 0, ...).
llvm-svn: 227827
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 07959a5a836..1224ac8f500 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -606,6 +606,7 @@ static bool isUnsignedDIType(DwarfDebug *DD, DIType Ty) { Encoding == dwarf::DW_ATE_unsigned_char || Encoding == dwarf::DW_ATE_signed || Encoding == dwarf::DW_ATE_signed_char || + Encoding == dwarf::DW_ATE_float || Encoding == dwarf::DW_ATE_UTF || Encoding == dwarf::DW_ATE_boolean || (Ty.getTag() == dwarf::DW_TAG_unspecified_type && Ty.getName() == "decltype(nullptr)")) && |