[PATCH] [lld] Make ELFLinkingContext own LinkerScript buffers
Shankar Kalpathi Easwaran
shankarke at gmail.com
Mon Feb 2 11:24:23 PST 2015
================
Comment at: include/lld/ReaderWriter/LinkerScript.h:757
@@ +756,3 @@
+ if (_hasError)
+ return nullptr;
+ return &_script;
----------------
We could just use one variable like how the File Parser does using llvm::Optional.
================
Comment at: include/lld/ReaderWriter/LinkerScript.h:761
@@ +760,3 @@
+ _parsed = true;
+ LinkerScript *res = parse();
+ if (res == nullptr)
----------------
could we use ErrorOr ?
================
Comment at: include/lld/ReaderWriter/LinkerScript.h:1016
@@ -992,1 +1015,3 @@
+ bool _parsed;
+ bool _hasError;
};
----------------
std::error_code instead of bool ?
http://reviews.llvm.org/D7323
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list