summaryrefslogtreecommitdiffstats
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
commitb6fb381dba3f28c83b9d696a973f8c1d2c7ce996 (patch)
treec55769c19b548758ec0d499afc3e102725ffb5c2
parent638d03de17753c57333fc43e07526dc0f13eebc8 (diff)
downloadbcm5719-llvm-b6fb381dba3f28c83b9d696a973f8c1d2c7ce996.tar.gz
bcm5719-llvm-b6fb381dba3f28c83b9d696a973f8c1d2c7ce996.zip
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.
llvm-svn: 165571
-rw-r--r--compiler-rt/lib/ubsan/ubsan_value.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler-rt/lib/ubsan/ubsan_value.h b/compiler-rt/lib/ubsan/ubsan_value.h
index d3e62853aec..0c41afafba9 100644
--- a/compiler-rt/lib/ubsan/ubsan_value.h
+++ b/compiler-rt/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
OpenPOWER on IntegriCloud