[llvm-commits] [compiler-rt] r165571 - /compiler-rt/trunk/lib/ubsan/ubsan_value.h
Richard Smith
richard-llvm at metafoo.co.uk
Tue Oct 9 16:55:18 PDT 2012
Author: rsmith
Date: Tue Oct 9 18:55:18 2012
New Revision: 165571
URL: http://llvm.org/viewvc/llvm-project?rev=165571&view=rev
Log:
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.
Modified:
compiler-rt/trunk/lib/ubsan/ubsan_value.h
Modified: compiler-rt/trunk/lib/ubsan/ubsan_value.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_value.h?rev=165571&r1=165570&r2=165571&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_value.h (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_value.h Tue Oct 9 18:55:18 2012
@@ -65,9 +65,6 @@
/// \brief A description of a type.
class TypeDescriptor {
- /// The name of the type, in a format suitable for including in diagnostics.
- const char *TypeName;
-
/// A value from the \c Kind enumeration, specifying what flavor of type we
/// have.
u16 TypeKind;
@@ -76,6 +73,10 @@
/// interpret the meaning of a ValueHandle of this type.
u16 TypeInfo;
+ /// The name of the type follows, in a format suitable for including in
+ /// diagnostics.
+ char TypeName[1];
+
public:
enum Kind {
/// An integer type. Lowest bit is 1 for a signed value, 0 for an unsigned
More information about the llvm-commits
mailing list