[PATCH] [COFF] Don't try to add quotes to already quoted linker directives

Michael Kuperstein michael.m.kuperstein at intel.com
Mon Dec 29 03:32:19 PST 2014


================
Comment at: lib/CodeGen/TargetLoweringObjectFileImpl.cpp:989
@@ -988,3 +988,3 @@
       std::string Escaped(" ");
-      if (Op.find(" ") != StringRef::npos) {
+      if ((Op.find(" ") != StringRef::npos) && (!Op.startswith("\""))) {
         // The PE-COFF spec says args with spaces must be quoted.  It doesn't say
----------------
majnemer wrote:
> This would probably be a little nicer as:
> `if (!Op.startswith("\"") && Op.find(" ") != StringRef::npos)`
> 
> This way we don't need to hunt for spaces if it starts with a \" sequence.
Right, noticed that myself after uploading, thanks. :-)

http://reviews.llvm.org/D6792

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






More information about the llvm-commits mailing list