[PATCH] COFF: Read linker directives from bitcode files.

Rui Ueyama ruiu at google.com
Fri Jun 5 18:35:14 PDT 2015


================
Comment at: COFF/SymbolTable.cpp:44
@@ +43,3 @@
+std::error_code SymbolTable::addDirectives(StringRef Dir) {
+  if (!Dir.empty()) {
+    std::vector<std::unique_ptr<InputFile>> Libs;
----------------
I'd reverse the condition to return early.

================
Comment at: COFF/SymbolTable.cpp:81
@@ -77,3 +80,3 @@
 
-  // TODO: Handle linker directives.
-  return std::error_code();
+  // Add any linker directives from the module flags metadata.
+  return addDirectives(File->getDirectives());
----------------
I'm wondering what kind of command line options compiled bitcode would actually contain. Is that /defaultlib option? Can you give me an example?

http://reviews.llvm.org/D10285

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list