summaryrefslogtreecommitdiff
path: root/lib/ubsan/ubsan_value.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-10-09 23:55:18 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-10-09 23:55:18 +0000
commited81c21984efb8c1f96c82de1dd5dbcea5d7aa65 (patch)
treeda1d9f10c12b4f37b366502cdf29fe0790b87946 /lib/ubsan/ubsan_value.h
parent6ebe45146a2d93eb010b9bb5ea34cb94c6900f83 (diff)
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@165571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan/ubsan_value.h')
-rw-r--r--lib/ubsan/ubsan_value.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ubsan/ubsan_value.h b/lib/ubsan/ubsan_value.h
index d3e62853a..0c41afafb 100644
--- a/lib/ubsan/ubsan_value.h
+++ b/lib/ubsan/ubsan_value.h
@@ -65,9 +65,6 @@ public:
/// \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 @@ class TypeDescriptor {
/// 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