This is an archive of the discontinued LLVM Phabricator instance.

[X86][clang] Put the update of HasLongDouble into TargetInfo::adjust
Needs ReviewPublic

Authored by pengfei on Dec 8 2021, 5:56 AM.

Details

Summary

We found a problem that -mlong-double-64 doesn't work with -mno-x87
due to the flag HasLongDouble was set earlier that the option taking
effect. https://godbolt.org/z/9hn8MnPr6

This patch fixes the problem by moving the update of HasLongDouble into
TargetInfo::adjust so that we can update it correctly.

Diff Detail

Event Timeline

pengfei requested review of this revision.Dec 8 2021, 5:56 AM
pengfei created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2021, 5:56 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

@craig.topper is the only one I know who can keep all of this straight, so perhaps he's willing to give a more in depth review?

clang/include/clang/Basic/TargetInfo.h
207

This seems so shockingly x86 specific, I'm a little concerned we are doing it here.