Skip to content

Commit de47c11

Browse files
committed
Fixed error test check for unified-lto-check
1 parent 9a56b8d commit de47c11

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

llvm/test/LTO/Resolution/X86/unified-lto-check.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
; RUN: not llvm-lto2 run --unified-lto=1 -o %t3 %t1 %t2 2>&1 | \
4747
; RUN: FileCheck %s --check-prefix INVALIDMODE
4848

49-
; INVALIDMODE: invalid LTO mode
49+
; INVALIDMODE: llvm-lto2: for the --unified-lto option: Cannot find option named
50+
5051

5152
; UNIFIEDERR: unified LTO compilation must use compatible bitcode modules
5253
; NOUNIFIEDERR-NOT: unified LTO compilation must use compatible bitcode modules

llvm/tools/llvm-lto2/llvm-lto2.cpp

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,13 @@ static cl::list<std::string>
201201
static cl::opt<LTO::LTOKind> UnifiedLTOMode(
202202
"unified-lto", cl::Optional,
203203
cl::desc("Set LTO mode with the following options:"),
204-
cl::values(
205-
clEnumValN(LTO::LTOK_UnifiedThin, "thin",
206-
"ThinLTO with Unified LTO enabled"),
207-
clEnumValN(LTO::LTOK_UnifiedRegular, "full",
208-
"Regular LTO with Unified LTO enabled"),
209-
clEnumValN(LTO::LTOK_Default, "default",
210-
"Any LTO mode without Unified LTO. The default mode")
211-
),
212-
cl::value_desc("mode"), cl::init(LTO::LTOK_Default));
204+
cl::values(clEnumValN(LTO::LTOK_UnifiedThin, "thin",
205+
"ThinLTO with Unified LTO enabled"),
206+
clEnumValN(LTO::LTOK_UnifiedRegular, "full",
207+
"Regular LTO with Unified LTO enabled"),
208+
clEnumValN(LTO::LTOK_Default, "default",
209+
"Any LTO mode without Unified LTO")),
210+
cl::value_desc("mode"), cl::init(LTO::LTOK_Default));
213211

214212
static cl::opt<bool> EnableFreestanding(
215213
"lto-freestanding",
@@ -576,7 +574,8 @@ static int dumpSymtab(int argc, char **argv) {
576574
}
577575

578576
if (TT.isOSBinFormatCOFF() && Sym.isWeak() && Sym.isIndirect())
579-
outs() << " fallback " << Sym.getCOFFWeakExternalFallback() << '\n';
577+
outs() << " fallback " << Sym.getCOFFWeakExternalFallback()
578+
<< '\n';
580579

581580
if (!Sym.getSectionName().empty())
582581
outs() << " section " << Sym.getSectionName() << "\n";

0 commit comments

Comments
 (0)