[flang] [clang] [llvm] [AArch64][Driver] Better handling of target feature dependencies (PR #78270)

Tomas Matheson via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 08:26:54 PST 2024


================
@@ -711,10 +819,10 @@ StringRef getArchExtFeature(StringRef ArchExt);
 StringRef resolveCPUAlias(StringRef CPU);
 
 // Information by Name
-std::optional<ArchInfo> getArchForCpu(StringRef CPU);
----------------
tmatheson-arm wrote:

Why the switch back to raw pointers from std::optional? This seems to undo what was done in https://reviews.llvm.org/D142539

Does this new implementation rely on there being one global copy of `ArchInfo`? A while back I tried to make this work so that `ArchInfo::operator==` made use of this address, but that ended up being unworkable so we switched to allowing copying of `ArchInfo` objects.

https://github.com/llvm/llvm-project/pull/78270


More information about the cfe-commits mailing list