[PATCH] Improve #pragma comment(lib) support

Rui Ueyama ruiu at google.com
Thu May 23 14:02:05 PDT 2013


-    Consumer.HandleDependentLibrary(Arg);
+    // If the argument does not end in .lib, automatically add the suffix.
This
+    // matches the behavior of MSVC.
+    std::string ArgStr = Arg;
+    StringRef End = Arg.substr( Arg.size() - 4 );

Looks like it's not safe if Arg.size() < 4.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130523/afbc8e37/attachment.html>


More information about the cfe-commits mailing list