summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/key-function-vtable.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-02-28 01:01:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-02-28 01:01:56 +0000
commit91c18de7556f9524c62f655ccdda94adf3848092 (patch)
tree2ce3a4ad6be2f320764a5d4d27d23e728132224c /clang/test/CodeGenCXX/key-function-vtable.cpp
parentf986d68b363a961a8bde29fcab649d46aaf23445 (diff)
downloadbcm5719-llvm-91c18de7556f9524c62f655ccdda94adf3848092.tar.gz
bcm5719-llvm-91c18de7556f9524c62f655ccdda94adf3848092.zip
Rework our handling of key functions. We used to track a complete list of all
dynamic classes in the translation unit and check whether each one's key function is defined when we got to the end of the TU (and when we got to the end of each module). This is really terrible for modules performance, since it causes unnecessary deserialization of every dynamic class in every compilation. We now use a much simpler (and, in a modules build, vastly more efficient) system: when we see an out-of-line definition of a virtual function, we check whether that function was in fact its class's key function. (If so, we need to emit the vtable.) llvm-svn: 230830
Diffstat (limited to 'clang/test/CodeGenCXX/key-function-vtable.cpp')
-rw-r--r--clang/test/CodeGenCXX/key-function-vtable.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/test/CodeGenCXX/key-function-vtable.cpp b/clang/test/CodeGenCXX/key-function-vtable.cpp
index 80ce497505d..f6aa16e51a9 100644
--- a/clang/test/CodeGenCXX/key-function-vtable.cpp
+++ b/clang/test/CodeGenCXX/key-function-vtable.cpp
@@ -43,11 +43,9 @@ inline void X1::f() { }
void use_X1() { X1 x1; }
-// FIXME: The checks are extremely difficult to get right when the globals
-// aren't alphabetized
-// CHECK: @_ZTV2X1 = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTV5testa = unnamed_addr constant [3 x i8*] [i8* null
-// CHECK: @_ZTV5testc = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
-// CHECK: @_ZTV5testb = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
-// CHECK: @_ZTV5teste = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
-// CHECK: @_ZTVN12_GLOBAL__N_15testgE = internal unnamed_addr constant [3 x i8*] [i8* null
+// CHECK-DAG: @_ZTV2X1 = linkonce_odr unnamed_addr constant
+// CHECK-DAG: @_ZTV5testa = unnamed_addr constant [3 x i8*] [i8* null
+// CHECK-DAG: @_ZTV5testc = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
+// CHECK-DAG: @_ZTV5testb = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
+// CHECK-DAG: @_ZTV5teste = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null
+// CHECK-DAG: @_ZTVN12_GLOBAL__N_15testgE = internal unnamed_addr constant [3 x i8*] [i8* null
OpenPOWER on IntegriCloud