Skip to content

Commit 890ea8b

Browse files
committed
[BOLT] Review changes
- full warning message in lit tests - \p in comment - more specific error messages
1 parent 30e3ccd commit 890ea8b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

bolt/lib/Rewrite/GNUPropertyRewriter.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Error GNUPropertyRewriter::sectionInitializer() {
8282
return Error::success();
8383
}
8484

85-
/// Desc contains an array of property descriptors. Each member has the
85+
/// \p Desc contains an array of property descriptors. Each member has the
8686
/// following structure:
8787
/// typedef struct {
8888
/// Elf_Word pr_type;
@@ -125,17 +125,17 @@ Expected<uint32_t> GNUPropertyRewriter::decodeGNUPropertyNote(StringRef Desc) {
125125
if (!Tmp)
126126
return createStringError(
127127
errc::executable_format_error,
128-
"out of bounds while reading .gnu.property.note section: %s",
128+
"failed to read property from .gnu.property.note section: %s",
129129
toString(Tmp.takeError()).c_str());
130130
Features = Features ? (*Features | FeaturesItem) : FeaturesItem;
131131
}
132132

133133
Cursor.seek(alignTo(PrDataEnd, Align));
134134
if (!Cursor)
135-
return createStringError(
136-
errc::executable_format_error,
137-
"out of bounds while reading .gnu.property.note section: %s",
138-
toString(Cursor.takeError()).c_str());
135+
return createStringError(errc::executable_format_error,
136+
"out of bounds while reading property array in "
137+
".gnu.property.note section: %s",
138+
toString(Cursor.takeError()).c_str());
139139
}
140140
return Features.value_or(0u);
141141
}

bolt/test/AArch64/bti-note.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ RUN: llvm-readelf -n %t.exe | FileCheck %s
77
CHECK: BTI
88

99
RUN: llvm-bolt %t.exe -o %t.exe.bolt | FileCheck %s -check-prefix=CHECK-BOLT
10-
CHECK-BOLT: BOLT-WARNING: binary is using BTI.
10+
CHECK-BOLT: BOLT-WARNING: binary is using BTI. Optimized binary may be corrupted

bolt/test/AArch64/no-bti-note.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ RUN: llvm-readelf -n %t.exe | FileCheck %s
77
CHECK-NOT: BTI
88

99
RUN: llvm-bolt %t.exe -o %t.exe.bolt | FileCheck %s -check-prefix=CHECK-BOLT
10-
CHECK-BOLT-NOT: BOLT-WARNING: binary is using BTI.
10+
CHECK-BOLT-NOT: BOLT-WARNING: binary is using BTI. Optimized binary may be corrupted

0 commit comments

Comments
 (0)