[PATCH] [lld] Add basic linker script parsing.

kledzik at apple.com kledzik at apple.com
Wed Feb 27 19:05:54 PST 2013



================
Comment at: include/lld/ReaderWriter/LinkerScript.h:29
@@ +28,3 @@
+namespace lld {
+class Token {
+public:
----------------
These are a bunch of generic class names (e.g. Token, Parser, etc) in the lld namespace.  Can you nest these classes inside LinkerScript or put them in an anonymous namespace inside the .cpp file?

================
Comment at: include/lld/ReaderWriter/LinkerScript.h:77
@@ +76,3 @@
+    CK_AsNeeded
+  };
+
----------------
Can this be a class enum, so you don't need the CK_ prefix?

================
Comment at: lib/ReaderWriter/ELF/ELFTargetInfo.cpp:79
@@ +78,3 @@
+    return *_linkerScriptReader;
+  }
+
----------------
It would be nice if this could be refactored to not need the std::bind and std:: placeholders.  This flexibility seems like over engineering that is hurting readability.


http://llvm-reviews.chandlerc.com/D477



More information about the llvm-commits mailing list