[PATCH] D14471: [AArch64] Fix a crash in driver

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 9 12:58:26 PST 2015


ahatanak added a comment.

Hi Renato

In http://reviews.llvm.org/D14471#285138, @rengolin wrote:

> I'm uncomfortable with this change, since it introduces a dependency between the two calls, and that's fragile. Also, the nullptr fiddling is not a good design overall.
>
> If there is a dependency, I suggest you encode it directly into getAArch64TargetFeatures() and not involve getAArch64TargetCPU() at all.


Could you elaborate on your comments?
Which two calls? Do you mean getAArch64TargetCPU and getAArch64ArchFeaturesFromMcpu?

> Maybe getAArch64TargetCPU() should just return "generic" for null pointer?


Do you mean getAArch64TargetCPU should return "generic" when IsNative is null?


http://reviews.llvm.org/D14471





More information about the cfe-commits mailing list