[cfe-commits] Add cpp frontend

Douglas Gregor dgregor at apple.com
Sun Mar 6 11:10:02 PST 2011


On Mar 6, 2011, at 11:04 AM, Joerg Sonnenberger wrote:

> 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++.

Okay!

>> 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.


Sounds good to me.

	- Doug



More information about the cfe-commits mailing list