From 2682bc3c9d1ec7da324bedfa46fce537797b5a49 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 6 Sep 2019 16:30:22 +0000 Subject: [ELF] Replace error() with errorOrWarn() for the ASSERT command Summary: ld.bfd produces an output with --noinhibit-exec when an ASSERT fails. Use errorOrWarn() so that we can produce an output as well. An interesting case is that symbol assignments may execute multiple times, so we probably want to suppress errors for non-final runs. Reviewed By: peter.smith Differential Revision: https://reviews.llvm.org/D67285 llvm-svn: 371225 --- lld/ELF/ScriptParser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lld/ELF/ScriptParser.cpp') diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index 40c993df550..9ada28ca13e 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -720,7 +720,7 @@ Expr ScriptParser::readAssert() { return [=] { if (!e().getValue()) - error(msg); + errorOrWarn(msg); return script->getDot(); }; } -- cgit v1.2.3