[lldb][Test][NFC] TestExternalCtorDtorLookup: add more instantiations to test linkage...
authorMichael Buch <michaelbuch12@gmail.com>
Mon, 13 Feb 2023 12:50:31 +0000 (12:50 +0000)
committerMichael Buch <michaelbuch12@gmail.com>
Mon, 13 Feb 2023 12:51:05 +0000 (12:51 +0000)
lldb/test/API/lang/cpp/external_ctor_dtor_lookup/Makefile
lldb/test/API/lang/cpp/external_ctor_dtor_lookup/lib.cpp [new file with mode: 0644]
lldb/test/API/lang/cpp/external_ctor_dtor_lookup/lib.h
lldb/test/API/lang/cpp/external_ctor_dtor_lookup/main.cpp

index eba1547..3e4cfc7 100644 (file)
@@ -1,3 +1,3 @@
-CXX_SOURCES := main.cpp
+CXX_SOURCES := main.cpp lib.cpp
                        
 include Makefile.rules 
diff --git a/lldb/test/API/lang/cpp/external_ctor_dtor_lookup/lib.cpp b/lldb/test/API/lang/cpp/external_ctor_dtor_lookup/lib.cpp
new file mode 100644 (file)
index 0000000..f1724b7
--- /dev/null
@@ -0,0 +1,3 @@
+#include "lib.h"
+
+Wrapper<Foo> getFooWrapper() { return {}; }
index 9664068..1fee83f 100644 (file)
@@ -8,5 +8,8 @@ public:
   [[gnu::abi_tag("test")]] ~Wrapper(){};
 };
 
-#endif // _H_IN
+struct Foo {};
+
+Wrapper<Foo> getFooWrapper();
 
+#endif // _H_IN
index 3904646..e1caf02 100644 (file)
@@ -1,7 +1,5 @@
 #include "lib.h"
 
-struct Foo {};
-
 struct Bar {
   Wrapper<Foo> getWrapper() { return Wrapper<Foo>(); }
   int sinkWrapper(Wrapper<Foo>) { return -1; }
@@ -9,6 +7,10 @@ struct Bar {
 
 int main() {
   Bar b;
+  Wrapper<int> w1;
+  Wrapper<double> w2;
+  Wrapper<Foo> w3 = getFooWrapper();
+  Wrapper<Foo> w4;
   return b.sinkWrapper(b.getWrapper());
 }