<div dir="ltr">Thanks David, I didn't really think about that before.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 20, 2015 at 9:08 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Feb 20, 2015 at 6:57 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ruiu<br>
Date: Fri Feb 20 08:57:04 2015<br>
New Revision: 230015<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=230015&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=230015&view=rev</a><br>
Log:<br>
Remove redundant "explicit".<br></blockquote></span><div><br>FWIW 'explicit' on > 1 arg ctors isn't actually redundant, it stops you from being able to use braced init. eg:<br><br>void func(Command);<br>...<br>func({p, k}); // this compiles if the ctor is not explicit, but fails to compile if the ctor is explicit<br><br>But we haven't really taken any consistent strategy about multi-arg ctor explicitness in LLVM, so I think this change is the right one - just mentioning for the sake of completeness.<br> </div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
lld/trunk/include/lld/ReaderWriter/LinkerScript.h<br>
<br>
Modified: lld/trunk/include/lld/ReaderWriter/LinkerScript.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/LinkerScript.h?rev=230015&r1=230014&r2=230015&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/LinkerScript.h?rev=230015&r1=230014&r2=230015&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/include/lld/ReaderWriter/LinkerScript.h (original)<br>
+++ lld/trunk/include/lld/ReaderWriter/LinkerScript.h Fri Feb 20 08:57:04 2015<br>
@@ -171,7 +171,7 @@ public:<br>
virtual ~Command() {}<br>
<br>
protected:<br>
- explicit Command(class Parser &ctx, Kind k) : _ctx(ctx), _kind(k) {}<br>
+ Command(class Parser &ctx, Kind k) : _ctx(ctx), _kind(k) {}<br>
<br>
private:<br>
Parser &_ctx;<br>
@@ -180,7 +180,7 @@ private:<br>
<br>
class Output : public Command {<br>
public:<br>
- explicit Output(Parser &ctx, StringRef outputFileName)<br>
+ Output(Parser &ctx, StringRef outputFileName)<br>
: Command(ctx, Kind::Output), _outputFileName(outputFileName) {}<br>
<br>
static bool classof(const Command *c) { return c->getKind() == Kind::Output; }<br>
@@ -197,7 +197,7 @@ private:<br>
<br>
class OutputFormat : public Command {<br>
public:<br>
- explicit OutputFormat(Parser &ctx, const SmallVectorImpl<StringRef> &formats)<br>
+ OutputFormat(Parser &ctx, const SmallVectorImpl<StringRef> &formats)<br>
: Command(ctx, Kind::OutputFormat) {<br>
size_t numFormats = formats.size();<br>
StringRef *formatsStart = getAllocator().Allocate<StringRef>(numFormats);<br>
@@ -229,7 +229,7 @@ private:<br>
<br>
class OutputArch : public Command {<br>
public:<br>
- explicit OutputArch(Parser &ctx, StringRef arch)<br>
+ OutputArch(Parser &ctx, StringRef arch)<br>
: Command(ctx, Kind::OutputArch), _arch(arch) {}<br>
<br>
static bool classof(const Command *c) {<br>
@@ -252,7 +252,7 @@ struct Path {<br>
bool _isDashlPrefix;<br>
<br>
Path() : _asNeeded(false), _isDashlPrefix(false) {}<br>
- explicit Path(StringRef path, bool asNeeded = false, bool isLib = false)<br>
+ Path(StringRef path, bool asNeeded = false, bool isLib = false)<br>
: _path(path), _asNeeded(asNeeded), _isDashlPrefix(isLib) {}<br>
};<br>
<br>
@@ -310,7 +310,7 @@ public:<br>
<br>
class Entry : public Command {<br>
public:<br>
- explicit Entry(Parser &ctx, StringRef entryName)<br>
+ Entry(Parser &ctx, StringRef entryName)<br>
: Command(ctx, Kind::Entry), _entryName(entryName) {}<br>
<br>
static bool classof(const Command *c) { return c->getKind() == Kind::Entry; }<br>
@@ -327,7 +327,7 @@ private:<br>
<br>
class SearchDir : public Command {<br>
public:<br>
- explicit SearchDir(Parser &ctx, StringRef searchPath)<br>
+ SearchDir(Parser &ctx, StringRef searchPath)<br>
: Command(ctx, Kind::SearchDir), _searchPath(searchPath) {}<br>
<br>
static bool classof(const Command *c) {<br>
@@ -368,7 +368,7 @@ public:<br>
virtual ~Expression() {}<br>
<br>
protected:<br>
- explicit Expression(class Parser &ctx, Kind k) : _ctx(ctx), _kind(k) {}<br>
+ Expression(class Parser &ctx, Kind k) : _ctx(ctx), _kind(k) {}<br>
<br>
private:<br>
Parser &_ctx;<br>
@@ -380,7 +380,7 @@ private:<br>
/// with a constant.<br>
class Constant : public Expression {<br>
public:<br>
- explicit Constant(Parser &ctx, uint64_t num)<br>
+ Constant(Parser &ctx, uint64_t num)<br>
: Expression(ctx, Kind::Constant), _num(num) {}<br>
void dump(raw_ostream &os) const override;<br>
<br>
@@ -586,7 +586,7 @@ public:<br>
virtual ~InputSection() {}<br>
<br>
protected:<br>
- explicit InputSection(Parser &ctx, Kind k) : _ctx(ctx), _kind(k) {}<br>
+ InputSection(Parser &ctx, Kind k) : _ctx(ctx), _kind(k) {}<br>
<br>
private:<br>
Parser &_ctx;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>