[llvm-commits] [patch] Fix getDriver().getInstalledDir() comparisons

Dimitry Andric dimitry at andric.com
Fri Feb 25 12:21:21 PST 2011


Since getDriver().getInstalledDir() returns a const char *, don't try to
compare it with getDriver().Dir.c_str(), since that is a pointer
comparison, not a "are these strings equal" comparison.

Instead, just compare with getDriver().Dir directly, so both sides will
get promoted to std::string, and the regular std::string comparison
operator applies.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clang-driver-dir-1.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110225/8c7710aa/attachment.ksh>


More information about the llvm-commits mailing list