This is an archive of the discontinued LLVM Phabricator instance.

[clang-cl] Emit nicer warning on unknown /arch: arguments
ClosedPublic

Authored by thakis on Sep 1 2021, 4:05 PM.

Details

Summary

Now prints the list of known archs. This requires plumbing a Driver
arg through a few functions.

Also add two more convenience insert() overlods to StringMap.

Diff Detail

Event Timeline

thakis created this revision.Sep 1 2021, 4:05 PM
thakis requested review of this revision.Sep 1 2021, 4:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2021, 4:05 PM
thakis updated this revision to Diff 370128.Sep 1 2021, 5:59 PM

clang-format

hans accepted this revision.Sep 2 2021, 7:01 AM

lgtm, nice!

llvm/include/llvm/ADT/StringMap.h
301

nit: i think typename is more common than class in llvm code

unittests/ADT/StringMapTest.cpp has tests for the insert methods, maybe it's worth adding one for this too (or the initializer_list one perhaps) even though it's pretty trivial?

This revision is now accepted and ready to land.Sep 2 2021, 7:01 AM
thakis marked an inline comment as done.Sep 2 2021, 7:31 AM

Thanks!

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2021, 7:37 AM