Skip to content

Commit a86df48

Browse files
committed
[libc++abi] Avoid including source files into unittest_demangle
That is not necessary to test what we're testing, and in fact including abort_message.cpp into that file caused some link errors if we didn't link some of the dependencies of libc++abi directly into the test. Differential Revision: https://reviews.llvm.org/D152862
1 parent baebe71 commit a86df48

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

libcxxabi/test/unittest_demangle.pass.cpp

+9-8
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,16 @@
77
//===----------------------------------------------------------------------===//
88

99
// UNSUPPORTED: c++03
10+
// ADDITIONAL_COMPILE_FLAGS: -Wno-unused-function
1011

11-
#include "../src/cxa_demangle.cpp"
12-
#include "../src/abort_message.cpp"
12+
#include <cassert>
13+
#include <utility>
1314

14-
using namespace __cxxabiv1;
15+
#include "../src/demangle/ItaniumDemangle.h"
1516

1617
void testPODSmallVector() {
1718
{ // {push/pop}_back
18-
PODSmallVector<int, 1> PSV;
19+
itanium_demangle::PODSmallVector<int, 1> PSV;
1920
PSV.push_back(0);
2021
PSV.push_back(1);
2122
PSV.push_back(2);
@@ -33,12 +34,12 @@ void testPODSmallVector() {
3334
}
3435

3536
{
36-
PODSmallVector<int, 1> PSV1;
37+
itanium_demangle::PODSmallVector<int, 1> PSV1;
3738
PSV1.push_back(1);
3839
PSV1.push_back(2);
3940
PSV1.push_back(3);
4041

41-
PODSmallVector<int, 1> PSV2;
42+
itanium_demangle::PODSmallVector<int, 1> PSV2;
4243
std::swap(PSV1, PSV2);
4344
assert(PSV1.size() == 0);
4445
assert(PSV2.size() == 3);
@@ -60,8 +61,8 @@ void testPODSmallVector() {
6061
}
6162

6263
{
63-
PODSmallVector<int, 10> PSV1;
64-
PODSmallVector<int, 10> PSV2;
64+
itanium_demangle::PODSmallVector<int, 10> PSV1;
65+
itanium_demangle::PODSmallVector<int, 10> PSV2;
6566
PSV1.push_back(0);
6667
PSV1.push_back(1);
6768
PSV1.push_back(2);

0 commit comments

Comments
 (0)