From 4fbe351817fc05214ff7a360af3601ef40d1941f Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Wed, 11 Oct 2017 00:06:27 +0000 Subject: Remove a constructor from ExprValue. NFC. I think three ctors are too many for this simple class. llvm-svn: 315394 --- lld/ELF/ScriptParser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lld/ELF/ScriptParser.cpp') diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index 6aa900380bd..58d1455a62c 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -150,7 +150,7 @@ static ExprValue add(ExprValue A, ExprValue B) { } static ExprValue sub(ExprValue A, ExprValue B) { - return {A.Sec, A.getSectionOffset() - B.getValue(), A.Loc}; + return {A.Sec, false, A.getSectionOffset() - B.getValue(), A.Loc}; } static ExprValue mul(ExprValue A, ExprValue B) { @@ -945,10 +945,10 @@ Expr ScriptParser::readPrimary() { } if (Tok == "ADDR") { StringRef Name = readParenLiteral(); - OutputSection *Cmd = Script->getOrCreateOutputSection(Name); + OutputSection *Sec = Script->getOrCreateOutputSection(Name); return [=]() -> ExprValue { - checkIfExists(Cmd, Location); - return {Cmd, 0, Location}; + checkIfExists(Sec, Location); + return {Sec, false, 0, Location}; }; } if (Tok == "ALIGN") { -- cgit v1.2.3