[cfe-commits] Add cpp frontend
Joerg Sonnenberger
joerg at britannica.bec.de
Sun Mar 6 11:04:00 PST 2011
On Sun, Mar 06, 2011 at 10:24:35AM -0800, Douglas Gregor wrote:
>
> On Mar 6, 2011, at 9:51 AM, Joerg Sonnenberger wrote:
> >> Index: tools/driver/driver.cpp
> >> ===================================================================
> >> --- tools/driver/driver.cpp (revision 126955)
> >> +++ tools/driver/driver.cpp (working copy)
> >> @@ -342,6 +342,11 @@
> >> TheDriver.CCCIsCXX = true;
> >> }
> >>
> >> + if (llvm::StringRef(ProgName).endswith("cpp") ||
> >> + llvm::StringRef(ProgName).rsplit('-').first.endswith("cpp")) {
> >> + TheDriver.CCCIsCPP = true;
> >> + }
>
> Why is this an "endswith" check rather than equality comparison?
> I suspect that we just want to match "cpp" or "cpp-version".
I've kept that in line with the clang++ tests. E.g. it makes sense to
install it as clang-cpp to coexist with C++.
> Even as "cpp", we're still going to outright reject "-traditional". Is that still the right thing to do?
There are enough use cases even without -traditional. For NetBSD, I will
use either mcpp or PCC's cpp for that purpose, so no big deal not having
it. There are other cases that directly profit from it though.
Joerg
More information about the cfe-commits
mailing list