1 //===- llvm/unittest/Support/DynamicLibrary/PipSqueak.cpp -----------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 std::vector
<std::string
> *Vec
;
14 Global() : Str(nullptr), Vec(nullptr) {}
19 *Str
= "Global::~Global";
28 Local(std::string
&S
) : Str(S
) {
30 if (Glb
.Str
&& !Glb
.Str
->empty())
31 Str
+= std::string("(") + *Glb
.Str
+ std::string(")");
33 ~Local() { Str
= "Local::~Local"; }
37 extern "C" PIPSQUEAK_EXPORT
void SetStrings(std::string
&GStr
,
40 static Local
Lcl(LStr
);
43 extern "C" PIPSQUEAK_EXPORT
void TestOrder(std::vector
<std::string
> &V
) {
47 #define PIPSQUEAK_TESTA_RETURN "LibCall"
48 #include "ExportedFuncs.cpp"