================ @@ -47,13 +47,12 @@ namespace sys { /// The particular format of the names are target dependent, and suitable for /// passing as -mattr to the target which matches the host. /// - /// \param Features - A string mapping feature names to either - /// true (if enabled) or false (if disabled). This routine makes no guarantees - /// about exactly which features may appear in this map, except that they are - /// all valid LLVM feature names. - /// - /// \return - True on success. - bool getHostCPUFeatures(StringMap<bool, MallocAllocator> &Features); + /// \return - A string map mapping feature names to either true (if enabled) + /// or false (if disabled). This routine makes no guarantees about exactly + /// which features may appear in this map, except that they are all valid LLVM + /// feature names. The map can be empty, for example if feature detection + /// fails. + StringMap<bool, MallocAllocator> getHostCPUFeatures(); ---------------- bulbazord wrote:
While we're here, maybe the return type should be marked `const`? This is a map, and `operator[]` is notoriously easy to mess up with maps. This might save somebody a big headache down the line. https://github.com/llvm/llvm-project/pull/97824 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits