LGTM with the Twine issue fixed.

================
Comment at: lib/Driver/ToolChains.cpp:2379
@@ +2378,3 @@
+  if (GCCInstallation.isValid() && isMipsArch(getTriple().getArch())) {
+    Twine MipsInc = GCCInstallation.getInstallPath() + "/include";
+    if (llvm::sys::fs::exists(MipsInc))
----------------
It is dangerous to use Twine like this. I think this case is safe, but a change 
to, for example, compute a string in getInstallPath instead of just returning a 
StringRef to a member would break this.

Can you add a trivial addExternCSystemIncludeIfExits with a Twine argument to 
avoid this? Or maybe addExternCSystemInclude itself could check if thee 
directory exit?


http://llvm-reviews.chandlerc.com/D644
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to