Skip to content

Commit 647f98e

Browse files
committed
review comments addressed
1 parent 27b4f10 commit 647f98e

File tree

3 files changed

+11
-28
lines changed

3 files changed

+11
-28
lines changed

llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@
2929
#include <utility>
3030
#include <vector>
3131

32-
#ifdef _AIX
33-
#define SYMBOLIZE_AIX 1
34-
#else
35-
#define SYMBOLIZE_AIX 0
36-
#endif
37-
3832
namespace llvm {
3933
namespace object {
4034
class ELFObjectFileBase;
@@ -210,9 +204,9 @@ class LLVMSymbolizer {
210204

211205
/// Return a pointer to object file at specified path, for a specified
212206
/// architecture that is present inside an archive file
213-
Expected<ObjectFile *>
214-
getOrCreateObjectFromArchive(StringRef ArchivePath, StringRef MemberName,
215-
StringRef ArchName);
207+
Expected<ObjectFile *> getOrCreateObjectFromArchive(StringRef ArchivePath,
208+
StringRef MemberName,
209+
StringRef ArchName);
216210

217211
/// Update the LRU cache order when a binary is accessed.
218212
void recordAccess(CachedBinary &Bin);
@@ -252,7 +246,7 @@ class LLVMSymbolizer {
252246

253247
std::map<ArchiveCacheKey, std::unique_ptr<ObjectFile>>
254248
ObjectForArchivePathAndArch;
255-
249+
256250
Options Opts;
257251

258252
std::unique_ptr<BuildIDFetcher> BIDFetcher;

llvm/test/DebugInfo/symbolize-big-archive-elf.test

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010

1111
// Test symbolization by member name (using just base names)
1212
// RUN: MEMBER1=$(basename %t-1.o)
13-
// RUN: llvm-symbolizer --default-arch=ppc64 --obj="%t.a($MEMBER1)" 0x0 | FileCheck %s --check-prefix=CHECK-1
13+
// RUN: llvm-symbolizer --default-arch=ppc64le --obj="%t.a($MEMBER1)" 0x0 | FileCheck %s --check-prefix=CHECK-1
14+
// RUN: llvm-symbolizer --obj="%t.a($MEMBER1):ppc64le" 0x0 | FileCheck %s --check-prefix=CHECK-1
1415
// RUN: MEMBER2=$(basename %t-2.o)
15-
// RUN: llvm-symbolizer --default-arch=ppc64 --obj="%t.a($MEMBER2)" 0x0 | FileCheck %s --check-prefix=CHECK-2
16+
// RUN: llvm-symbolizer --default-arch=ppc64le --obj="%t.a($MEMBER2)" 0x0 | FileCheck %s --check-prefix=CHECK-2
17+
// RUN: llvm-symbolizer --obj="%t.a($MEMBER2):ppc64le" 0x0 | FileCheck %s --check-prefix=CHECK-2
1618
// CHECK-1: foo1
1719
// CHECK-2: foo2
1820

llvm/test/DebugInfo/symbolize-big-archive-xcoff.test

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,12 @@
77
// Create archive with same-named members using different modes
88
// RUN: rm -f %t.a
99
// RUN: cp %t-32.o %t.o
10-
// RUN: if [ "$(uname)" = "AIX" ]; then \
11-
llvm-ar -X32 crv %t.a %t.o; \
12-
else \
13-
llvm-ar crv %t.a %t.o; \
14-
fi
10+
// RUN: llvm-ar %if system-aix %{-X32%} crv %t.a %t.o
1511
// RUN: cp %t-64.o %t.o
16-
// RUN: if [ "$(uname)" = "AIX" ]; then \
17-
llvm-ar -X64 rv %t.a %t.o; \
18-
else \
19-
llvm-ar qv %t.a %t.o; \
20-
fi
21-
12+
// RUN: llvm-ar %if system-aix %{-X64 rv%} %else %{qv%} %t.a %t.o
2213

2314
// Verify archive contains two members with same name
24-
// RUN: if [ "$(uname)" = "AIX" ]; then \
25-
llvm-ar tv -X32_64 %t.a | FileCheck %s --check-prefix=CHECK-ARCHIVE; \
26-
else \
27-
llvm-ar tv %t.a | FileCheck %s --check-prefix=CHECK-ARCHIVE; \
28-
fi
15+
// RUN: llvm-ar tv %if system-aix %{-X32_64%} %t.a | FileCheck %s --check-prefix=CHECK-ARCHIVE
2916
// CHECK-ARCHIVE: {{.*}}symbolize-big-archive-xcoff.test.tmp.o{{$}}
3017
// CHECK-ARCHIVE: {{.*}}symbolize-big-archive-xcoff.test.tmp.o{{$}}
3118

0 commit comments

Comments
 (0)