[PATCH] Refactoring of Driver and TargetInfo
Shankar Kalpathi Easwaran
shankarke at gmail.com
Tue Apr 2 20:58:02 PDT 2013
Other than the below comments, LGTM.
================
Comment at: lib/Core/Resolver.cpp:368-371
@@ -364,3 +367,6 @@
this->deadStripOptimize();
- this->checkUndefines(false);
+ if (this->checkUndefines(false)) {
+ if (!_targetInfo.allowRemainingUndefines())
+ return true;
+ }
this->removeCoalescedAwayAtoms();
----------------
Should the returns be vice versa. true on success / false on failure. Might be easier to read if (!resolve()) for failure cases.
================
Comment at: lib/Driver/CoreOptions.td:6-11
@@ -13,5 +5,8 @@
-def OCTOTHORPE_OCTOTHORPE_OCTOTHORPE : Flag<["-"], "###">;
+def dead_strip : Flag<["--"], "dead-strip">;
+def undefines_are_errors : Flag<["--"], "undefines-are-errors">;
+def keep_globals : Flag<["--"], "keep-globals">;
+def commons_search_archives : Flag<["--"], "commons-search-archives">;
-def emit_yaml : Flag<["-"], "emit-yaml">;
+def add_pass : Separate<["--"], "add-pass">;
----------------
Why extra spaces ?
================
Comment at: lib/Driver/DarwinOptions.td:21-35
@@ +20,16 @@
+ HelpText<"min iOS version">;
+def ios_simulator_version_min : Separate<["-"], "ios_simulator_version_min">,
+ HelpText<"min iOS simulator version">;
+
+
+
+def output : Separate<["-"], "o">, HelpText<"output file name">;
+
+
+def dump : Flag<["-"], "###">;
+
+def emit_yaml : Flag<["-"], "emit_yaml">;
+
+
+def L : Joined<["-"], "L">;
+
----------------
lot of new lines ? not sure if it exists in the file though.
================
Comment at: lib/Driver/LDOptions.td:21-23
@@ -16,8 +20,5 @@
def dynamic_linker : Separate<["-"], "dynamic-linker">;
-def OCTOTHORPE_OCTOTHORPE_OCTOTHORPE : Flag<["-"], "###">;
-
-def emit_yaml : Flag<["-"], "emit-yaml">;
def m : Separate<["-"], "m">;
----------------
Same here, lot of new lines. Not sure if its in the file though.
================
Comment at: lib/ReaderWriter/ELF/ELFTargetInfo.cpp:66-68
@@ -80,1 +65,5 @@
+ if (_outputFileType == elf::ET_EXEC) {
+ if (_entrySymbolName.empty()) {
+ _entrySymbolName = "start";
+ }
}
----------------
_start
http://llvm-reviews.chandlerc.com/D589
More information about the llvm-commits
mailing list