Options.td 422 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116
  1. //===--- Options.td - Options for clang -----------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines the options accepted by clang.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. // Include the common option parsing interfaces.
  13. include "llvm/Option/OptParser.td"
  14. /////////
  15. // Flags
  16. // The option is a "driver"-only option, and should not be forwarded to other
  17. // tools via `-Xarch` options.
  18. def NoXarchOption : OptionFlag;
  19. // LinkerInput - The option is a linker input.
  20. def LinkerInput : OptionFlag;
  21. // NoArgumentUnused - Don't report argument unused warnings for this option; this
  22. // is useful for options like -static or -dynamic which a user may always end up
  23. // passing, even if the platform defaults to (or only supports) that option.
  24. def NoArgumentUnused : OptionFlag;
  25. // Unsupported - The option is unsupported, and the driver will reject command
  26. // lines that use it.
  27. def Unsupported : OptionFlag;
  28. // Ignored - The option is unsupported, and the driver will silently ignore it.
  29. def Ignored : OptionFlag;
  30. // CoreOption - This is considered a "core" Clang option, available in both
  31. // clang and clang-cl modes.
  32. def CoreOption : OptionFlag;
  33. // CLOption - This is a cl.exe compatibility option. Options with this flag
  34. // are made available when the driver is running in CL compatibility mode.
  35. def CLOption : OptionFlag;
  36. // CC1Option - This option should be accepted by clang -cc1.
  37. def CC1Option : OptionFlag;
  38. // CC1AsOption - This option should be accepted by clang -cc1as.
  39. def CC1AsOption : OptionFlag;
  40. // DXCOption - This is a dxc.exe compatibility option. Options with this flag
  41. // are made available when the driver is running in DXC compatibility mode.
  42. def DXCOption : OptionFlag;
  43. // CLDXCOption - This is a cl.exe/dxc.exe compatibility option. Options with this flag
  44. // are made available when the driver is running in CL/DXC compatibility mode.
  45. def CLDXCOption : OptionFlag;
  46. // NoDriverOption - This option should not be accepted by the driver.
  47. def NoDriverOption : OptionFlag;
  48. // If an option affects linking, but has a primary group (so Link_Group cannot
  49. // be used), add this flag.
  50. def LinkOption : OptionFlag;
  51. // FlangOption - This is considered a "core" Flang option, available in
  52. // flang mode.
  53. def FlangOption : OptionFlag;
  54. // FlangOnlyOption - This option should only be used by Flang (i.e. it is not
  55. // available for Clang)
  56. def FlangOnlyOption : OptionFlag;
  57. // FC1Option - This option should be accepted by flang -fc1.
  58. def FC1Option : OptionFlag;
  59. // A short name to show in documentation. The name will be interpreted as rST.
  60. class DocName<string name> { string DocName = name; }
  61. // A brief description to show in documentation, interpreted as rST.
  62. class DocBrief<code descr> { code DocBrief = descr; }
  63. // Indicates that this group should be flattened into its parent when generating
  64. // documentation.
  65. class DocFlatten { bit DocFlatten = 1; }
  66. // Indicates that this warning is ignored, but accepted with a warning for
  67. // GCC compatibility.
  68. class IgnoredGCCCompat : Flags<[HelpHidden]> {}
  69. /////////
  70. // Groups
  71. def Action_Group : OptionGroup<"<action group>">, DocName<"Actions">,
  72. DocBrief<[{The action to perform on the input.}]>;
  73. // Meta-group for options which are only used for compilation,
  74. // and not linking etc.
  75. def CompileOnly_Group : OptionGroup<"<CompileOnly group>">,
  76. DocName<"Compilation flags">, DocBrief<[{
  77. Flags controlling the behavior of Clang during compilation. These flags have
  78. no effect during actions that do not perform compilation.}]>;
  79. def Preprocessor_Group : OptionGroup<"<Preprocessor group>">,
  80. Group<CompileOnly_Group>,
  81. DocName<"Preprocessor flags">, DocBrief<[{
  82. Flags controlling the behavior of the Clang preprocessor.}]>;
  83. def IncludePath_Group : OptionGroup<"<I/i group>">, Group<Preprocessor_Group>,
  84. DocName<"Include path management">,
  85. DocBrief<[{
  86. Flags controlling how ``#include``\s are resolved to files.}]>;
  87. def I_Group : OptionGroup<"<I group>">, Group<IncludePath_Group>, DocFlatten;
  88. def i_Group : OptionGroup<"<i group>">, Group<IncludePath_Group>, DocFlatten;
  89. def clang_i_Group : OptionGroup<"<clang i group>">, Group<i_Group>, DocFlatten;
  90. def M_Group : OptionGroup<"<M group>">, Group<Preprocessor_Group>,
  91. DocName<"Dependency file generation">, DocBrief<[{
  92. Flags controlling generation of a dependency file for ``make``-like build
  93. systems.}]>;
  94. def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>,
  95. DocName<"Dumping preprocessor state">, DocBrief<[{
  96. Flags allowing the state of the preprocessor to be dumped in various ways.}]>;
  97. def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>,
  98. DocName<"Diagnostic flags">, DocBrief<[{
  99. Flags controlling which warnings, errors, and remarks Clang will generate.
  100. See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.}]>;
  101. def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten;
  102. def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>,
  103. DocFlatten;
  104. def W_Group : OptionGroup<"<W group>">, Group<Diag_Group>, DocFlatten;
  105. def W_value_Group : OptionGroup<"<W (with value) group>">, Group<W_Group>,
  106. DocFlatten;
  107. def f_Group : OptionGroup<"<f group>">, Group<CompileOnly_Group>,
  108. DocName<"Target-independent compilation options">;
  109. def f_clang_Group : OptionGroup<"<f (clang-only) group>">,
  110. Group<CompileOnly_Group>, DocFlatten;
  111. def pedantic_Group : OptionGroup<"<pedantic group>">, Group<f_Group>,
  112. DocFlatten;
  113. def opencl_Group : OptionGroup<"<opencl group>">, Group<f_Group>,
  114. DocName<"OpenCL flags">;
  115. def sycl_Group : OptionGroup<"<SYCL group>">, Group<f_Group>,
  116. DocName<"SYCL flags">;
  117. def m_Group : OptionGroup<"<m group>">, Group<CompileOnly_Group>,
  118. DocName<"Target-dependent compilation options">;
  119. // Feature groups - these take command line options that correspond directly to
  120. // target specific features and can be translated directly from command line
  121. // options.
  122. def m_aarch64_Features_Group : OptionGroup<"<aarch64 features group>">,
  123. Group<m_Group>, DocName<"AARCH64">;
  124. def m_amdgpu_Features_Group : OptionGroup<"<amdgpu features group>">,
  125. Group<m_Group>, DocName<"AMDGPU">;
  126. def m_arm_Features_Group : OptionGroup<"<arm features group>">,
  127. Group<m_Group>, DocName<"ARM">;
  128. def m_hexagon_Features_Group : OptionGroup<"<hexagon features group>">,
  129. Group<m_Group>, DocName<"Hexagon">;
  130. def m_sparc_Features_Group : OptionGroup<"<sparc features group>">,
  131. Group<m_Group>, DocName<"SPARC">;
  132. // The features added by this group will not be added to target features.
  133. // These are explicitly handled.
  134. def m_hexagon_Features_HVX_Group : OptionGroup<"<hexagon features group>">,
  135. Group<m_Group>, DocName<"Hexagon">;
  136. def m_m68k_Features_Group: OptionGroup<"<m68k features group>">,
  137. Group<m_Group>, DocName<"M68k">;
  138. def m_mips_Features_Group : OptionGroup<"<mips features group>">,
  139. Group<m_Group>, DocName<"MIPS">;
  140. def m_ppc_Features_Group : OptionGroup<"<ppc features group>">,
  141. Group<m_Group>, DocName<"PowerPC">;
  142. def m_wasm_Features_Group : OptionGroup<"<wasm features group>">,
  143. Group<m_Group>, DocName<"WebAssembly">;
  144. // The features added by this group will not be added to target features.
  145. // These are explicitly handled.
  146. def m_wasm_Features_Driver_Group : OptionGroup<"<wasm driver features group>">,
  147. Group<m_Group>, DocName<"WebAssembly Driver">;
  148. def m_x86_Features_Group : OptionGroup<"<x86 features group>">,
  149. Group<m_Group>, Flags<[CoreOption]>, DocName<"X86">;
  150. def m_riscv_Features_Group : OptionGroup<"<riscv features group>">,
  151. Group<m_Group>, DocName<"RISCV">;
  152. def m_libc_Group : OptionGroup<"<m libc group>">, Group<m_mips_Features_Group>,
  153. Flags<[HelpHidden]>;
  154. def O_Group : OptionGroup<"<O group>">, Group<CompileOnly_Group>,
  155. DocName<"Optimization level">, DocBrief<[{
  156. Flags controlling how much optimization should be performed.}]>;
  157. def DebugInfo_Group : OptionGroup<"<g group>">, Group<CompileOnly_Group>,
  158. DocName<"Debug information generation">, DocBrief<[{
  159. Flags controlling how much and what kind of debug information should be
  160. generated.}]>;
  161. def g_Group : OptionGroup<"<g group>">, Group<DebugInfo_Group>,
  162. DocName<"Kind and level of debug information">;
  163. def gN_Group : OptionGroup<"<gN group>">, Group<g_Group>,
  164. DocName<"Debug level">;
  165. def ggdbN_Group : OptionGroup<"<ggdbN group>">, Group<gN_Group>, DocFlatten;
  166. def gTune_Group : OptionGroup<"<gTune group>">, Group<g_Group>,
  167. DocName<"Debugger to tune debug information for">;
  168. def g_flags_Group : OptionGroup<"<g flags group>">, Group<DebugInfo_Group>,
  169. DocName<"Debug information flags">;
  170. def StaticAnalyzer_Group : OptionGroup<"<Static analyzer group>">,
  171. DocName<"Static analyzer flags">, DocBrief<[{
  172. Flags controlling the behavior of the Clang Static Analyzer.}]>;
  173. // gfortran options that we recognize in the driver and pass along when
  174. // invoking GCC to compile Fortran code.
  175. def gfortran_Group : OptionGroup<"<gfortran group>">,
  176. DocName<"Fortran compilation flags">, DocBrief<[{
  177. Flags that will be passed onto the ``gfortran`` compiler when Clang is given
  178. a Fortran input.}]>;
  179. def Link_Group : OptionGroup<"<T/e/s/t/u group>">, DocName<"Linker flags">,
  180. DocBrief<[{Flags that are passed on to the linker}]>;
  181. def T_Group : OptionGroup<"<T group>">, Group<Link_Group>, DocFlatten;
  182. def u_Group : OptionGroup<"<u group>">, Group<Link_Group>, DocFlatten;
  183. def reserved_lib_Group : OptionGroup<"<reserved libs group>">,
  184. Flags<[Unsupported]>;
  185. // Temporary groups for clang options which we know we don't support,
  186. // but don't want to verbosely warn the user about.
  187. def clang_ignored_f_Group : OptionGroup<"<clang ignored f group>">,
  188. Group<f_Group>, Flags<[Ignored]>;
  189. def clang_ignored_m_Group : OptionGroup<"<clang ignored m group>">,
  190. Group<m_Group>, Flags<[Ignored]>;
  191. // Group for clang options in the process of deprecation.
  192. // Please include the version that deprecated the flag as comment to allow
  193. // easier garbage collection.
  194. def clang_ignored_legacy_options_Group : OptionGroup<"<clang legacy flags>">,
  195. Group<f_Group>, Flags<[Ignored]>;
  196. // Retired with clang-5.0
  197. def : Flag<["-"], "fslp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
  198. def : Flag<["-"], "fno-slp-vectorize-aggressive">, Group<clang_ignored_legacy_options_Group>;
  199. // Retired with clang-10.0. Previously controlled X86 MPX ISA.
  200. def mmpx : Flag<["-"], "mmpx">, Group<clang_ignored_legacy_options_Group>;
  201. def mno_mpx : Flag<["-"], "mno-mpx">, Group<clang_ignored_legacy_options_Group>;
  202. // Retired with clang-16.0, to provide a deprecation period; it should
  203. // be removed in Clang 18 or later.
  204. def enable_trivial_var_init_zero : Flag<["-"], "enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang">,
  205. Flags<[CC1Option, CoreOption, NoArgumentUnused]>,
  206. Group<clang_ignored_legacy_options_Group>;
  207. // Group that ignores all gcc optimizations that won't be implemented
  208. def clang_ignored_gcc_optimization_f_Group : OptionGroup<
  209. "<clang_ignored_gcc_optimization_f_Group>">, Group<f_Group>, Flags<[Ignored]>;
  210. class DiagnosticOpts<string base>
  211. : KeyPathAndMacro<"DiagnosticOpts->", base, "DIAG_"> {}
  212. class LangOpts<string base>
  213. : KeyPathAndMacro<"LangOpts->", base, "LANG_"> {}
  214. class TargetOpts<string base>
  215. : KeyPathAndMacro<"TargetOpts->", base, "TARGET_"> {}
  216. class FrontendOpts<string base>
  217. : KeyPathAndMacro<"FrontendOpts.", base, "FRONTEND_"> {}
  218. class PreprocessorOutputOpts<string base>
  219. : KeyPathAndMacro<"PreprocessorOutputOpts.", base, "PREPROCESSOR_OUTPUT_"> {}
  220. class DependencyOutputOpts<string base>
  221. : KeyPathAndMacro<"DependencyOutputOpts.", base, "DEPENDENCY_OUTPUT_"> {}
  222. class CodeGenOpts<string base>
  223. : KeyPathAndMacro<"CodeGenOpts.", base, "CODEGEN_"> {}
  224. class HeaderSearchOpts<string base>
  225. : KeyPathAndMacro<"HeaderSearchOpts->", base, "HEADER_SEARCH_"> {}
  226. class PreprocessorOpts<string base>
  227. : KeyPathAndMacro<"PreprocessorOpts->", base, "PREPROCESSOR_"> {}
  228. class FileSystemOpts<string base>
  229. : KeyPathAndMacro<"FileSystemOpts.", base, "FILE_SYSTEM_"> {}
  230. class AnalyzerOpts<string base>
  231. : KeyPathAndMacro<"AnalyzerOpts->", base, "ANALYZER_"> {}
  232. class MigratorOpts<string base>
  233. : KeyPathAndMacro<"MigratorOpts.", base, "MIGRATOR_"> {}
  234. // A boolean option which is opt-in in CC1. The positive option exists in CC1 and
  235. // Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
  236. // This is useful if the option is usually disabled.
  237. // Use this only when the option cannot be declared via BoolFOption.
  238. multiclass OptInCC1FFlag<string name, string pos_prefix, string neg_prefix="",
  239. string help="", list<OptionFlag> flags=[]> {
  240. def f#NAME : Flag<["-"], "f"#name>, Flags<[CC1Option] # flags>,
  241. Group<f_Group>, HelpText<pos_prefix # help>;
  242. def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
  243. Group<f_Group>, HelpText<neg_prefix # help>;
  244. }
  245. // A boolean option which is opt-out in CC1. The negative option exists in CC1 and
  246. // Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
  247. // Use this only when the option cannot be declared via BoolFOption.
  248. multiclass OptOutCC1FFlag<string name, string pos_prefix, string neg_prefix,
  249. string help="", list<OptionFlag> flags=[]> {
  250. def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
  251. Group<f_Group>, HelpText<pos_prefix # help>;
  252. def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[CC1Option] # flags>,
  253. Group<f_Group>, HelpText<neg_prefix # help>;
  254. }
  255. // A boolean option which is opt-in in FC1. The positive option exists in FC1 and
  256. // Args.hasArg(OPT_ffoo) can be used to check that the flag is enabled.
  257. // This is useful if the option is usually disabled.
  258. multiclass OptInFC1FFlag<string name, string pos_prefix, string neg_prefix="",
  259. string help="", list<OptionFlag> flags=[]> {
  260. def f#NAME : Flag<["-"], "f"#name>, Flags<[FC1Option] # flags>,
  261. Group<f_Group>, HelpText<pos_prefix # help>;
  262. def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<flags>,
  263. Group<f_Group>, HelpText<neg_prefix # help>;
  264. }
  265. // A boolean option which is opt-out in FC1. The negative option exists in FC1 and
  266. // Args.hasArg(OPT_fno_foo) can be used to check that the flag is disabled.
  267. multiclass OptOutFC1FFlag<string name, string pos_prefix, string neg_prefix,
  268. string help="", list<OptionFlag> flags=[]> {
  269. def f#NAME : Flag<["-"], "f"#name>, Flags<flags>,
  270. Group<f_Group>, HelpText<pos_prefix # help>;
  271. def fno_#NAME : Flag<["-"], "fno-"#name>, Flags<[FC1Option] # flags>,
  272. Group<f_Group>, HelpText<neg_prefix # help>;
  273. }
  274. // Creates a positive and negative flags where both of them are prefixed with
  275. // "m", have help text specified for positive and negative option, and a Group
  276. // optionally specified by the opt_group argument, otherwise Group<m_Group>.
  277. multiclass SimpleMFlag<string name, string pos_prefix, string neg_prefix,
  278. string help, OptionGroup opt_group = m_Group> {
  279. def m#NAME : Flag<["-"], "m"#name>, Group<opt_group>,
  280. HelpText<pos_prefix # help>;
  281. def mno_#NAME : Flag<["-"], "mno-"#name>, Group<opt_group>,
  282. HelpText<neg_prefix # help>;
  283. }
  284. //===----------------------------------------------------------------------===//
  285. // BoolOption
  286. //===----------------------------------------------------------------------===//
  287. // The default value of a marshalled key path.
  288. class Default<code value> { code Value = value; }
  289. // Convenience variables for boolean defaults.
  290. def DefaultTrue : Default<"true"> {}
  291. def DefaultFalse : Default<"false"> {}
  292. // The value set to the key path when the flag is present on the command line.
  293. class Set<bit value> { bit Value = value; }
  294. def SetTrue : Set<true> {}
  295. def SetFalse : Set<false> {}
  296. // Definition of single command line flag. This is an implementation detail, use
  297. // SetTrueBy or SetFalseBy instead.
  298. class FlagDef<bit polarity, bit value, list<OptionFlag> option_flags,
  299. string help, list<code> implied_by_expressions = []> {
  300. // The polarity. Besides spelling, this also decides whether the TableGen
  301. // record will be prefixed with "no_".
  302. bit Polarity = polarity;
  303. // The value assigned to key path when the flag is present on command line.
  304. bit Value = value;
  305. // OptionFlags that control visibility of the flag in different tools.
  306. list<OptionFlag> OptionFlags = option_flags;
  307. // The help text associated with the flag.
  308. string Help = help;
  309. // List of expressions that, when true, imply this flag.
  310. list<code> ImpliedBy = implied_by_expressions;
  311. }
  312. // Additional information to be appended to both positive and negative flag.
  313. class BothFlags<list<OptionFlag> option_flags, string help = ""> {
  314. list<OptionFlag> OptionFlags = option_flags;
  315. string Help = help;
  316. }
  317. // Functor that appends the suffix to the base flag definition.
  318. class ApplySuffix<FlagDef flag, BothFlags suffix> {
  319. FlagDef Result
  320. = FlagDef<flag.Polarity, flag.Value,
  321. flag.OptionFlags # suffix.OptionFlags,
  322. flag.Help # suffix.Help, flag.ImpliedBy>;
  323. }
  324. // Definition of the command line flag with positive spelling, e.g. "-ffoo".
  325. class PosFlag<Set value, list<OptionFlag> flags = [], string help = "",
  326. list<code> implied_by_expressions = []>
  327. : FlagDef<true, value.Value, flags, help, implied_by_expressions> {}
  328. // Definition of the command line flag with negative spelling, e.g. "-fno-foo".
  329. class NegFlag<Set value, list<OptionFlag> flags = [], string help = "",
  330. list<code> implied_by_expressions = []>
  331. : FlagDef<false, value.Value, flags, help, implied_by_expressions> {}
  332. // Expanded FlagDef that's convenient for creation of TableGen records.
  333. class FlagDefExpanded<FlagDef flag, string prefix, string name, string spelling>
  334. : FlagDef<flag.Polarity, flag.Value, flag.OptionFlags, flag.Help,
  335. flag.ImpliedBy> {
  336. // Name of the TableGen record.
  337. string RecordName = prefix # !if(flag.Polarity, "", "no_") # name;
  338. // Spelling of the flag.
  339. string Spelling = prefix # !if(flag.Polarity, "", "no-") # spelling;
  340. // Can the flag be implied by another flag?
  341. bit CanBeImplied = !not(!empty(flag.ImpliedBy));
  342. // C++ code that will be assigned to the keypath when the flag is present.
  343. code ValueAsCode = !if(flag.Value, "true", "false");
  344. }
  345. // TableGen record for a single marshalled flag.
  346. class MarshalledFlagRec<FlagDefExpanded flag, FlagDefExpanded other,
  347. FlagDefExpanded implied, KeyPathAndMacro kpm,
  348. Default default>
  349. : Flag<["-"], flag.Spelling>, Flags<flag.OptionFlags>, HelpText<flag.Help>,
  350. MarshallingInfoBooleanFlag<kpm, default.Value, flag.ValueAsCode,
  351. other.ValueAsCode, other.RecordName>,
  352. ImpliedByAnyOf<implied.ImpliedBy, implied.ValueAsCode> {}
  353. // Generates TableGen records for two command line flags that control the same
  354. // key path via the marshalling infrastructure.
  355. // Names of the records consist of the specified prefix, "no_" for the negative
  356. // flag, and NAME.
  357. // Used for -cc1 frontend options. Driver-only options do not map to
  358. // CompilerInvocation.
  359. multiclass BoolOption<string prefix = "", string spelling_base,
  360. KeyPathAndMacro kpm, Default default,
  361. FlagDef flag1_base, FlagDef flag2_base,
  362. BothFlags suffix = BothFlags<[], "">> {
  363. defvar flag1 = FlagDefExpanded<ApplySuffix<flag1_base, suffix>.Result, prefix,
  364. NAME, spelling_base>;
  365. defvar flag2 = FlagDefExpanded<ApplySuffix<flag2_base, suffix>.Result, prefix,
  366. NAME, spelling_base>;
  367. // The flags must have different polarity, different values, and only
  368. // one can be implied.
  369. assert !xor(flag1.Polarity, flag2.Polarity),
  370. "the flags must have different polarity: flag1: " #
  371. flag1.Polarity # ", flag2: " # flag2.Polarity;
  372. assert !ne(flag1.Value, flag2.Value),
  373. "the flags must have different values: flag1: " #
  374. flag1.Value # ", flag2: " # flag2.Value;
  375. assert !not(!and(flag1.CanBeImplied, flag2.CanBeImplied)),
  376. "only one of the flags can be implied: flag1: " #
  377. flag1.CanBeImplied # ", flag2: " # flag2.CanBeImplied;
  378. defvar implied = !if(flag1.CanBeImplied, flag1, flag2);
  379. def flag1.RecordName : MarshalledFlagRec<flag1, flag2, implied, kpm, default>;
  380. def flag2.RecordName : MarshalledFlagRec<flag2, flag1, implied, kpm, default>;
  381. }
  382. /// Creates a BoolOption where both of the flags are prefixed with "f", are in
  383. /// the Group<f_Group>.
  384. /// Used for -cc1 frontend options. Driver-only options do not map to
  385. /// CompilerInvocation.
  386. multiclass BoolFOption<string flag_base, KeyPathAndMacro kpm,
  387. Default default, FlagDef flag1, FlagDef flag2,
  388. BothFlags both = BothFlags<[], "">> {
  389. defm NAME : BoolOption<"f", flag_base, kpm, default, flag1, flag2, both>,
  390. Group<f_Group>;
  391. }
  392. // Creates a BoolOption where both of the flags are prefixed with "g" and have
  393. // the Group<g_Group>.
  394. // Used for -cc1 frontend options. Driver-only options do not map to
  395. // CompilerInvocation.
  396. multiclass BoolGOption<string flag_base, KeyPathAndMacro kpm,
  397. Default default, FlagDef flag1, FlagDef flag2,
  398. BothFlags both = BothFlags<[], "">> {
  399. defm NAME : BoolOption<"g", flag_base, kpm, default, flag1, flag2, both>,
  400. Group<g_Group>;
  401. }
  402. // FIXME: Diagnose if target does not support protected visibility.
  403. class MarshallingInfoVisibility<KeyPathAndMacro kpm, code default>
  404. : MarshallingInfoEnum<kpm, default>,
  405. Values<"default,hidden,internal,protected">,
  406. NormalizedValues<["DefaultVisibility", "HiddenVisibility",
  407. "HiddenVisibility", "ProtectedVisibility"]> {}
  408. // Key paths that are constant during parsing of options with the same key path prefix.
  409. defvar cplusplus = LangOpts<"CPlusPlus">;
  410. defvar cpp11 = LangOpts<"CPlusPlus11">;
  411. defvar cpp17 = LangOpts<"CPlusPlus17">;
  412. defvar cpp20 = LangOpts<"CPlusPlus20">;
  413. defvar c99 = LangOpts<"C99">;
  414. defvar c2x = LangOpts<"C2x">;
  415. defvar lang_std = LangOpts<"LangStd">;
  416. defvar open_cl = LangOpts<"OpenCL">;
  417. defvar cuda = LangOpts<"CUDA">;
  418. defvar render_script = LangOpts<"RenderScript">;
  419. defvar hip = LangOpts<"HIP">;
  420. defvar gnu_mode = LangOpts<"GNUMode">;
  421. defvar asm_preprocessor = LangOpts<"AsmPreprocessor">;
  422. defvar hlsl = LangOpts<"HLSL">;
  423. defvar std = !strconcat("LangStandard::getLangStandardForKind(", lang_std.KeyPath, ")");
  424. /////////
  425. // Options
  426. // The internal option ID must be a valid C++ identifier and results in a
  427. // clang::driver::options::OPT_XX enum constant for XX.
  428. //
  429. // We want to unambiguously be able to refer to options from the driver source
  430. // code, for this reason the option name is mangled into an ID. This mangling
  431. // isn't guaranteed to have an inverse, but for practical purposes it does.
  432. //
  433. // The mangling scheme is to ignore the leading '-', and perform the following
  434. // substitutions:
  435. // _ => __
  436. // - => _
  437. // / => _SLASH
  438. // # => _HASH
  439. // ? => _QUESTION
  440. // , => _COMMA
  441. // = => _EQ
  442. // C++ => CXX
  443. // . => _
  444. // Developer Driver Options
  445. def internal_Group : OptionGroup<"<clang internal options>">, Flags<[HelpHidden]>;
  446. def internal_driver_Group : OptionGroup<"<clang driver internal options>">,
  447. Group<internal_Group>, HelpText<"DRIVER OPTIONS">;
  448. def internal_debug_Group :
  449. OptionGroup<"<clang debug/development internal options>">,
  450. Group<internal_Group>, HelpText<"DEBUG/DEVELOPMENT OPTIONS">;
  451. class InternalDriverOpt : Group<internal_driver_Group>,
  452. Flags<[NoXarchOption, HelpHidden]>;
  453. def driver_mode : Joined<["--"], "driver-mode=">, Group<internal_driver_Group>,
  454. Flags<[CoreOption, NoXarchOption, HelpHidden]>,
  455. HelpText<"Set the driver mode to either 'gcc', 'g++', 'cpp', or 'cl'">;
  456. def rsp_quoting : Joined<["--"], "rsp-quoting=">, Group<internal_driver_Group>,
  457. Flags<[CoreOption, NoXarchOption, HelpHidden]>,
  458. HelpText<"Set the rsp quoting to either 'posix', or 'windows'">;
  459. def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, InternalDriverOpt,
  460. HelpText<"Name for native GCC compiler">,
  461. MetaVarName<"<gcc-path>">;
  462. class InternalDebugOpt : Group<internal_debug_Group>,
  463. Flags<[NoXarchOption, HelpHidden, CoreOption]>;
  464. def ccc_install_dir : Separate<["-"], "ccc-install-dir">, InternalDebugOpt,
  465. HelpText<"Simulate installation in the given directory">;
  466. def ccc_print_phases : Flag<["-"], "ccc-print-phases">, InternalDebugOpt,
  467. HelpText<"Dump list of actions to perform">;
  468. def ccc_print_bindings : Flag<["-"], "ccc-print-bindings">, InternalDebugOpt,
  469. HelpText<"Show bindings of tools to actions">;
  470. def ccc_arcmt_check : Flag<["-"], "ccc-arcmt-check">, InternalDriverOpt,
  471. HelpText<"Check for ARC migration issues that need manual handling">;
  472. def ccc_arcmt_modify : Flag<["-"], "ccc-arcmt-modify">, InternalDriverOpt,
  473. HelpText<"Apply modifications to files to conform to ARC">;
  474. def ccc_arcmt_migrate : Separate<["-"], "ccc-arcmt-migrate">, InternalDriverOpt,
  475. HelpText<"Apply modifications and produces temporary files that conform to ARC">;
  476. def arcmt_migrate_report_output : Separate<["-"], "arcmt-migrate-report-output">,
  477. HelpText<"Output path for the plist report">, Flags<[CC1Option]>,
  478. MarshallingInfoString<FrontendOpts<"ARCMTMigrateReportOut">>;
  479. def arcmt_migrate_emit_arc_errors : Flag<["-"], "arcmt-migrate-emit-errors">,
  480. HelpText<"Emit ARC errors even if the migrator can fix them">, Flags<[CC1Option]>,
  481. MarshallingInfoFlag<FrontendOpts<"ARCMTMigrateEmitARCErrors">>;
  482. def gen_reproducer_eq: Joined<["-"], "gen-reproducer=">, Flags<[NoArgumentUnused, CoreOption]>,
  483. HelpText<"Emit reproducer on (option: off, crash (default), error, always)">;
  484. def gen_reproducer: Flag<["-"], "gen-reproducer">, InternalDebugOpt,
  485. Alias<gen_reproducer_eq>, AliasArgs<["always"]>,
  486. HelpText<"Auto-generates preprocessed source files and a reproduction script">;
  487. def gen_cdb_fragment_path: Separate<["-"], "gen-cdb-fragment-path">, InternalDebugOpt,
  488. HelpText<"Emit a compilation database fragment to the specified directory">;
  489. def round_trip_args : Flag<["-"], "round-trip-args">, Flags<[CC1Option, NoDriverOption]>,
  490. HelpText<"Enable command line arguments round-trip.">;
  491. def no_round_trip_args : Flag<["-"], "no-round-trip-args">, Flags<[CC1Option, NoDriverOption]>,
  492. HelpText<"Disable command line arguments round-trip.">;
  493. def _migrate : Flag<["--"], "migrate">, Flags<[NoXarchOption]>,
  494. HelpText<"Run the migrator">;
  495. def ccc_objcmt_migrate : Separate<["-"], "ccc-objcmt-migrate">,
  496. InternalDriverOpt,
  497. HelpText<"Apply modifications and produces temporary files to migrate to "
  498. "modern ObjC syntax">;
  499. def objcmt_migrate_literals : Flag<["-"], "objcmt-migrate-literals">, Flags<[CC1Option]>,
  500. HelpText<"Enable migration to modern ObjC literals">,
  501. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Literals">;
  502. def objcmt_migrate_subscripting : Flag<["-"], "objcmt-migrate-subscripting">, Flags<[CC1Option]>,
  503. HelpText<"Enable migration to modern ObjC subscripting">,
  504. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Subscripting">;
  505. def objcmt_migrate_property : Flag<["-"], "objcmt-migrate-property">, Flags<[CC1Option]>,
  506. HelpText<"Enable migration to modern ObjC property">,
  507. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Property">;
  508. def objcmt_migrate_all : Flag<["-"], "objcmt-migrate-all">, Flags<[CC1Option]>,
  509. HelpText<"Enable migration to modern ObjC">,
  510. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_MigrateDecls">;
  511. def objcmt_migrate_readonly_property : Flag<["-"], "objcmt-migrate-readonly-property">, Flags<[CC1Option]>,
  512. HelpText<"Enable migration to modern ObjC readonly property">,
  513. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadonlyProperty">;
  514. def objcmt_migrate_readwrite_property : Flag<["-"], "objcmt-migrate-readwrite-property">, Flags<[CC1Option]>,
  515. HelpText<"Enable migration to modern ObjC readwrite property">,
  516. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReadwriteProperty">;
  517. def objcmt_migrate_property_dot_syntax : Flag<["-"], "objcmt-migrate-property-dot-syntax">, Flags<[CC1Option]>,
  518. HelpText<"Enable migration of setter/getter messages to property-dot syntax">,
  519. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_PropertyDotSyntax">;
  520. def objcmt_migrate_annotation : Flag<["-"], "objcmt-migrate-annotation">, Flags<[CC1Option]>,
  521. HelpText<"Enable migration to property and method annotations">,
  522. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Annotation">;
  523. def objcmt_migrate_instancetype : Flag<["-"], "objcmt-migrate-instancetype">, Flags<[CC1Option]>,
  524. HelpText<"Enable migration to infer instancetype for method result type">,
  525. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_Instancetype">;
  526. def objcmt_migrate_nsmacros : Flag<["-"], "objcmt-migrate-ns-macros">, Flags<[CC1Option]>,
  527. HelpText<"Enable migration to NS_ENUM/NS_OPTIONS macros">,
  528. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsMacros">;
  529. def objcmt_migrate_protocol_conformance : Flag<["-"], "objcmt-migrate-protocol-conformance">, Flags<[CC1Option]>,
  530. HelpText<"Enable migration to add protocol conformance on classes">,
  531. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ProtocolConformance">;
  532. def objcmt_atomic_property : Flag<["-"], "objcmt-atomic-property">, Flags<[CC1Option]>,
  533. HelpText<"Make migration to 'atomic' properties">,
  534. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_AtomicProperty">;
  535. def objcmt_returns_innerpointer_property : Flag<["-"], "objcmt-returns-innerpointer-property">, Flags<[CC1Option]>,
  536. HelpText<"Enable migration to annotate property with NS_RETURNS_INNER_POINTER">,
  537. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_ReturnsInnerPointerProperty">;
  538. def objcmt_ns_nonatomic_iosonly: Flag<["-"], "objcmt-ns-nonatomic-iosonly">, Flags<[CC1Option]>,
  539. HelpText<"Enable migration to use NS_NONATOMIC_IOSONLY macro for setting property's 'atomic' attribute">,
  540. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_NsAtomicIOSOnlyProperty">;
  541. def objcmt_migrate_designated_init : Flag<["-"], "objcmt-migrate-designated-init">, Flags<[CC1Option]>,
  542. HelpText<"Enable migration to infer NS_DESIGNATED_INITIALIZER for initializer methods">,
  543. MarshallingInfoBitfieldFlag<FrontendOpts<"ObjCMTAction">, "FrontendOptions::ObjCMT_DesignatedInitializer">;
  544. def objcmt_allowlist_dir_path: Joined<["-"], "objcmt-allowlist-dir-path=">, Flags<[CC1Option]>,
  545. HelpText<"Only modify files with a filename contained in the provided directory path">,
  546. MarshallingInfoString<FrontendOpts<"ObjCMTAllowListPath">>;
  547. def : Joined<["-"], "objcmt-whitelist-dir-path=">, Flags<[CC1Option]>,
  548. HelpText<"Alias for -objcmt-allowlist-dir-path">,
  549. Alias<objcmt_allowlist_dir_path>;
  550. // The misspelt "white-list" [sic] alias is due for removal.
  551. def : Joined<["-"], "objcmt-white-list-dir-path=">, Flags<[CC1Option]>,
  552. Alias<objcmt_allowlist_dir_path>;
  553. // Make sure all other -ccc- options are rejected.
  554. def ccc_ : Joined<["-"], "ccc-">, Group<internal_Group>, Flags<[Unsupported]>;
  555. // Standard Options
  556. def _HASH_HASH_HASH : Flag<["-"], "###">, Flags<[NoXarchOption, CoreOption, FlangOption]>,
  557. HelpText<"Print (but do not run) the commands to run for this compilation">;
  558. def _DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>,
  559. Flags<[NoXarchOption, CoreOption]>;
  560. def A : JoinedOrSeparate<["-"], "A">, Flags<[RenderJoined]>, Group<gfortran_Group>;
  561. def B : JoinedOrSeparate<["-"], "B">, MetaVarName<"<prefix>">,
  562. HelpText<"Search $prefix$file for executables, libraries, and data files. "
  563. "If $prefix is a directory, search $prefix/$file">;
  564. def gcc_install_dir_EQ : Joined<["--"], "gcc-install-dir=">,
  565. HelpText<"Use GCC installation in the specified directory. The directory ends with path components like 'lib{,32,64}/gcc{,-cross}/$triple/$version'. "
  566. "Note: executables (e.g. ld) used by the compiler are not overridden by the selected GCC installation">;
  567. def gcc_toolchain : Joined<["--"], "gcc-toolchain=">, Flags<[NoXarchOption]>,
  568. HelpText<"Specify a directory where Clang can find 'include' and 'lib{,32,64}/gcc{,-cross}/$triple/$version'. "
  569. "Clang will use the GCC installation with the largest version">;
  570. def CC : Flag<["-"], "CC">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
  571. HelpText<"Include comments from within macros in preprocessed output">,
  572. MarshallingInfoFlag<PreprocessorOutputOpts<"ShowMacroComments">>;
  573. def C : Flag<["-"], "C">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
  574. HelpText<"Include comments in preprocessed output">,
  575. MarshallingInfoFlag<PreprocessorOutputOpts<"ShowComments">>;
  576. def D : JoinedOrSeparate<["-"], "D">, Group<Preprocessor_Group>,
  577. Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>=<value>">,
  578. HelpText<"Define <macro> to <value> (or 1 if <value> omitted)">;
  579. def E : Flag<["-"], "E">, Flags<[NoXarchOption,CC1Option, FlangOption, FC1Option]>, Group<Action_Group>,
  580. HelpText<"Only run the preprocessor">;
  581. def F : JoinedOrSeparate<["-"], "F">, Flags<[RenderJoined,CC1Option]>,
  582. HelpText<"Add directory to framework include search path">;
  583. def G : JoinedOrSeparate<["-"], "G">, Flags<[NoXarchOption]>, Group<m_Group>,
  584. MetaVarName<"<size>">, HelpText<"Put objects of at most <size> bytes "
  585. "into small data section (MIPS / Hexagon)">;
  586. def G_EQ : Joined<["-"], "G=">, Flags<[NoXarchOption]>, Group<m_Group>, Alias<G>;
  587. def H : Flag<["-"], "H">, Flags<[CC1Option]>, Group<Preprocessor_Group>,
  588. HelpText<"Show header includes and nesting depth">,
  589. MarshallingInfoFlag<DependencyOutputOpts<"ShowHeaderIncludes">>;
  590. def fshow_skipped_includes : Flag<["-"], "fshow-skipped-includes">,
  591. Flags<[CC1Option]>, HelpText<"Show skipped includes in -H output.">,
  592. DocBrief<[{#include files may be "skipped" due to include guard optimization
  593. or #pragma once. This flag makes -H show also such includes.}]>,
  594. MarshallingInfoFlag<DependencyOutputOpts<"ShowSkippedHeaderIncludes">>;
  595. def I_ : Flag<["-"], "I-">, Group<I_Group>,
  596. HelpText<"Restrict all prior -I flags to double-quoted inclusion and "
  597. "remove current directory from include path">;
  598. def I : JoinedOrSeparate<["-"], "I">, Group<I_Group>,
  599. Flags<[CC1Option,CC1AsOption,FlangOption,FC1Option]>, MetaVarName<"<dir>">,
  600. HelpText<"Add directory to the end of the list of include search paths">,
  601. DocBrief<[{Add directory to include search path. For C++ inputs, if
  602. there are multiple -I options, these directories are searched
  603. in the order they are given before the standard system directories
  604. are searched. If the same directory is in the SYSTEM include search
  605. paths, for example if also specified with -isystem, the -I option
  606. will be ignored}]>;
  607. def L : JoinedOrSeparate<["-"], "L">, Flags<[RenderJoined]>, Group<Link_Group>,
  608. MetaVarName<"<dir>">, HelpText<"Add directory to library search path">;
  609. def MD : Flag<["-"], "MD">, Group<M_Group>,
  610. HelpText<"Write a depfile containing user and system headers">;
  611. def MMD : Flag<["-"], "MMD">, Group<M_Group>,
  612. HelpText<"Write a depfile containing user headers">;
  613. def M : Flag<["-"], "M">, Group<M_Group>,
  614. HelpText<"Like -MD, but also implies -E and writes to stdout by default">;
  615. def MM : Flag<["-"], "MM">, Group<M_Group>,
  616. HelpText<"Like -MMD, but also implies -E and writes to stdout by default">;
  617. def MF : JoinedOrSeparate<["-"], "MF">, Group<M_Group>,
  618. HelpText<"Write depfile output from -MMD, -MD, -MM, or -M to <file>">,
  619. MetaVarName<"<file>">;
  620. def MG : Flag<["-"], "MG">, Group<M_Group>, Flags<[CC1Option]>,
  621. HelpText<"Add missing headers to depfile">,
  622. MarshallingInfoFlag<DependencyOutputOpts<"AddMissingHeaderDeps">>;
  623. def MJ : JoinedOrSeparate<["-"], "MJ">, Group<M_Group>,
  624. HelpText<"Write a compilation database entry per input">;
  625. def MP : Flag<["-"], "MP">, Group<M_Group>, Flags<[CC1Option]>,
  626. HelpText<"Create phony target for each dependency (other than main file)">,
  627. MarshallingInfoFlag<DependencyOutputOpts<"UsePhonyTargets">>;
  628. def MQ : JoinedOrSeparate<["-"], "MQ">, Group<M_Group>, Flags<[CC1Option]>,
  629. HelpText<"Specify name of main file output to quote in depfile">;
  630. def MT : JoinedOrSeparate<["-"], "MT">, Group<M_Group>, Flags<[CC1Option]>,
  631. HelpText<"Specify name of main file output in depfile">,
  632. MarshallingInfoStringVector<DependencyOutputOpts<"Targets">>;
  633. def MV : Flag<["-"], "MV">, Group<M_Group>, Flags<[CC1Option]>,
  634. HelpText<"Use NMake/Jom format for the depfile">,
  635. MarshallingInfoFlag<DependencyOutputOpts<"OutputFormat">, "DependencyOutputFormat::Make">,
  636. Normalizer<"makeFlagToValueNormalizer(DependencyOutputFormat::NMake)">;
  637. def Mach : Flag<["-"], "Mach">, Group<Link_Group>;
  638. def O0 : Flag<["-"], "O0">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>;
  639. def O4 : Flag<["-"], "O4">, Group<O_Group>, Flags<[CC1Option, FC1Option, HelpHidden]>;
  640. def ObjCXX : Flag<["-"], "ObjC++">, Flags<[NoXarchOption]>,
  641. HelpText<"Treat source input files as Objective-C++ inputs">;
  642. def ObjC : Flag<["-"], "ObjC">, Flags<[NoXarchOption]>,
  643. HelpText<"Treat source input files as Objective-C inputs">;
  644. def O : Joined<["-"], "O">, Group<O_Group>, Flags<[CC1Option,FC1Option]>;
  645. def O_flag : Flag<["-"], "O">, Flags<[CC1Option,FC1Option]>, Alias<O>, AliasArgs<["1"]>;
  646. def Ofast : Joined<["-"], "Ofast">, Group<O_Group>, Flags<[CC1Option, FlangOption]>;
  647. def P : Flag<["-"], "P">, Flags<[CC1Option,FlangOption,FC1Option]>, Group<Preprocessor_Group>,
  648. HelpText<"Disable linemarker output in -E mode">,
  649. MarshallingInfoNegativeFlag<PreprocessorOutputOpts<"ShowLineMarkers">>;
  650. def Qy : Flag<["-"], "Qy">, Flags<[CC1Option]>,
  651. HelpText<"Emit metadata containing compiler name and version">;
  652. def Qn : Flag<["-"], "Qn">, Flags<[CC1Option]>,
  653. HelpText<"Do not emit metadata containing compiler name and version">;
  654. def : Flag<["-"], "fident">, Group<f_Group>, Alias<Qy>,
  655. Flags<[CoreOption, CC1Option]>;
  656. def : Flag<["-"], "fno-ident">, Group<f_Group>, Alias<Qn>,
  657. Flags<[CoreOption, CC1Option]>;
  658. def Qunused_arguments : Flag<["-"], "Qunused-arguments">, Flags<[NoXarchOption, CoreOption]>,
  659. HelpText<"Don't emit warning for unused driver arguments">;
  660. def Q : Flag<["-"], "Q">, IgnoredGCCCompat;
  661. def Rpass_EQ : Joined<["-"], "Rpass=">, Group<R_value_Group>, Flags<[CC1Option]>,
  662. HelpText<"Report transformations performed by optimization passes whose "
  663. "name matches the given POSIX regular expression">;
  664. def Rpass_missed_EQ : Joined<["-"], "Rpass-missed=">, Group<R_value_Group>,
  665. Flags<[CC1Option]>,
  666. HelpText<"Report missed transformations by optimization passes whose "
  667. "name matches the given POSIX regular expression">;
  668. def Rpass_analysis_EQ : Joined<["-"], "Rpass-analysis=">, Group<R_value_Group>,
  669. Flags<[CC1Option]>,
  670. HelpText<"Report transformation analysis from optimization passes whose "
  671. "name matches the given POSIX regular expression">;
  672. def R_Joined : Joined<["-"], "R">, Group<R_Group>, Flags<[CC1Option, CoreOption]>,
  673. MetaVarName<"<remark>">, HelpText<"Enable the specified remark">;
  674. def S : Flag<["-"], "S">, Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>, Group<Action_Group>,
  675. HelpText<"Only run preprocess and compilation steps">;
  676. def T : JoinedOrSeparate<["-"], "T">, Group<T_Group>,
  677. MetaVarName<"<script>">, HelpText<"Specify <script> as linker script">;
  678. def U : JoinedOrSeparate<["-"], "U">, Group<Preprocessor_Group>,
  679. Flags<[CC1Option, FlangOption, FC1Option]>, MetaVarName<"<macro>">, HelpText<"Undefine macro <macro>">;
  680. def V : JoinedOrSeparate<["-"], "V">, Flags<[NoXarchOption, Unsupported]>;
  681. def Wa_COMMA : CommaJoined<["-"], "Wa,">,
  682. HelpText<"Pass the comma separated arguments in <arg> to the assembler">,
  683. MetaVarName<"<arg>">;
  684. def Wall : Flag<["-"], "Wall">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
  685. def WCL4 : Flag<["-"], "WCL4">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
  686. def Wsystem_headers : Flag<["-"], "Wsystem-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
  687. def Wno_system_headers : Flag<["-"], "Wno-system-headers">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
  688. def Wdeprecated : Flag<["-"], "Wdeprecated">, Group<W_Group>, Flags<[CC1Option]>,
  689. HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">;
  690. def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group<W_Group>, Flags<[CC1Option]>;
  691. def Wl_COMMA : CommaJoined<["-"], "Wl,">, Flags<[LinkerInput, RenderAsInput]>,
  692. HelpText<"Pass the comma separated arguments in <arg> to the linker">,
  693. MetaVarName<"<arg>">, Group<Link_Group>;
  694. // FIXME: This is broken; these should not be Joined arguments.
  695. def Wno_nonportable_cfstrings : Joined<["-"], "Wno-nonportable-cfstrings">, Group<W_Group>,
  696. Flags<[CC1Option]>;
  697. def Wnonportable_cfstrings : Joined<["-"], "Wnonportable-cfstrings">, Group<W_Group>,
  698. Flags<[CC1Option]>;
  699. def Wp_COMMA : CommaJoined<["-"], "Wp,">,
  700. HelpText<"Pass the comma separated arguments in <arg> to the preprocessor">,
  701. MetaVarName<"<arg>">, Group<Preprocessor_Group>;
  702. def Wundef_prefix_EQ : CommaJoined<["-"], "Wundef-prefix=">, Group<W_value_Group>,
  703. Flags<[CC1Option, CoreOption, HelpHidden]>, MetaVarName<"<arg>">,
  704. HelpText<"Enable warnings for undefined macros with a prefix in the comma separated list <arg>">,
  705. MarshallingInfoStringVector<DiagnosticOpts<"UndefPrefixes">>;
  706. def Wwrite_strings : Flag<["-"], "Wwrite-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
  707. def Wno_write_strings : Flag<["-"], "Wno-write-strings">, Group<W_Group>, Flags<[CC1Option, HelpHidden]>;
  708. def W_Joined : Joined<["-"], "W">, Group<W_Group>, Flags<[CC1Option, CoreOption, FC1Option, FlangOption]>,
  709. MetaVarName<"<warning>">, HelpText<"Enable the specified warning">;
  710. def Xanalyzer : Separate<["-"], "Xanalyzer">,
  711. HelpText<"Pass <arg> to the static analyzer">, MetaVarName<"<arg>">,
  712. Group<StaticAnalyzer_Group>;
  713. def Xarch__ : JoinedAndSeparate<["-"], "Xarch_">, Flags<[NoXarchOption]>;
  714. def Xarch_host : Separate<["-"], "Xarch_host">, Flags<[NoXarchOption]>,
  715. HelpText<"Pass <arg> to the CUDA/HIP host compilation">, MetaVarName<"<arg>">;
  716. def Xarch_device : Separate<["-"], "Xarch_device">, Flags<[NoXarchOption]>,
  717. HelpText<"Pass <arg> to the CUDA/HIP device compilation">, MetaVarName<"<arg>">;
  718. def Xassembler : Separate<["-"], "Xassembler">,
  719. HelpText<"Pass <arg> to the assembler">, MetaVarName<"<arg>">,
  720. Group<CompileOnly_Group>;
  721. def Xclang : Separate<["-"], "Xclang">,
  722. HelpText<"Pass <arg> to clang -cc1">, MetaVarName<"<arg>">,
  723. Flags<[NoXarchOption, CoreOption]>, Group<CompileOnly_Group>;
  724. def : Joined<["-"], "Xclang=">, Group<CompileOnly_Group>, Flags<[NoXarchOption, CoreOption]>, Alias<Xclang>,
  725. HelpText<"Alias for -Xclang">, MetaVarName<"<arg>">;
  726. def Xcuda_fatbinary : Separate<["-"], "Xcuda-fatbinary">,
  727. HelpText<"Pass <arg> to fatbinary invocation">, MetaVarName<"<arg>">;
  728. def Xcuda_ptxas : Separate<["-"], "Xcuda-ptxas">,
  729. HelpText<"Pass <arg> to the ptxas assembler">, MetaVarName<"<arg>">;
  730. def Xopenmp_target : Separate<["-"], "Xopenmp-target">, Group<CompileOnly_Group>,
  731. HelpText<"Pass <arg> to the target offloading toolchain.">, MetaVarName<"<arg>">;
  732. def Xopenmp_target_EQ : JoinedAndSeparate<["-"], "Xopenmp-target=">, Group<CompileOnly_Group>,
  733. HelpText<"Pass <arg> to the target offloading toolchain identified by <triple>.">,
  734. MetaVarName<"<triple> <arg>">;
  735. def z : Separate<["-"], "z">, Flags<[LinkerInput]>,
  736. HelpText<"Pass -z <arg> to the linker">, MetaVarName<"<arg>">,
  737. Group<Link_Group>;
  738. def offload_link : Flag<["--"], "offload-link">, Group<Link_Group>,
  739. HelpText<"Use the new offloading linker to perform the link job.">;
  740. def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>,
  741. HelpText<"Pass <arg> to the linker">, MetaVarName<"<arg>">,
  742. Group<Link_Group>;
  743. def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">,
  744. HelpText<"Pass <arg> to the offload linkers or the ones idenfied by -<triple>">,
  745. MetaVarName<"<triple> <arg>">, Group<Link_Group>;
  746. def Xpreprocessor : Separate<["-"], "Xpreprocessor">, Group<Preprocessor_Group>,
  747. HelpText<"Pass <arg> to the preprocessor">, MetaVarName<"<arg>">;
  748. def X_Flag : Flag<["-"], "X">, Group<Link_Group>;
  749. // Used by some macOS projects. IgnoredGCCCompat is a misnomer since GCC doesn't allow it.
  750. def : Flag<["-"], "Xparser">, IgnoredGCCCompat;
  751. // FIXME -Xcompiler is misused by some ChromeOS packages. Remove it after a while.
  752. def : Flag<["-"], "Xcompiler">, IgnoredGCCCompat;
  753. def Z_Flag : Flag<["-"], "Z">, Group<Link_Group>;
  754. def all__load : Flag<["-"], "all_load">;
  755. def allowable__client : Separate<["-"], "allowable_client">;
  756. def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>;
  757. def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">;
  758. def arch : Separate<["-"], "arch">, Flags<[NoXarchOption]>;
  759. def arch__only : Separate<["-"], "arch_only">;
  760. def autocomplete : Joined<["--"], "autocomplete=">;
  761. def bind__at__load : Flag<["-"], "bind_at_load">;
  762. def bundle__loader : Separate<["-"], "bundle_loader">;
  763. def bundle : Flag<["-"], "bundle">;
  764. def b : JoinedOrSeparate<["-"], "b">, Flags<[LinkerInput]>,
  765. HelpText<"Pass -b <arg> to the linker on AIX">, MetaVarName<"<arg>">,
  766. Group<Link_Group>;
  767. // OpenCL-only Options
  768. def cl_opt_disable : Flag<["-"], "cl-opt-disable">, Group<opencl_Group>, Flags<[CC1Option]>,
  769. HelpText<"OpenCL only. This option disables all optimizations. By default optimizations are enabled.">;
  770. def cl_strict_aliasing : Flag<["-"], "cl-strict-aliasing">, Group<opencl_Group>, Flags<[CC1Option]>,
  771. HelpText<"OpenCL only. This option is added for compatibility with OpenCL 1.0.">;
  772. def cl_single_precision_constant : Flag<["-"], "cl-single-precision-constant">, Group<opencl_Group>, Flags<[CC1Option]>,
  773. HelpText<"OpenCL only. Treat double precision floating-point constant as single precision constant.">,
  774. MarshallingInfoFlag<LangOpts<"SinglePrecisionConstants">>;
  775. def cl_finite_math_only : Flag<["-"], "cl-finite-math-only">, Group<opencl_Group>, Flags<[CC1Option]>,
  776. HelpText<"OpenCL only. Allow floating-point optimizations that assume arguments and results are not NaNs or +-Inf.">,
  777. MarshallingInfoFlag<LangOpts<"CLFiniteMathOnly">>;
  778. def cl_kernel_arg_info : Flag<["-"], "cl-kernel-arg-info">, Group<opencl_Group>, Flags<[CC1Option]>,
  779. HelpText<"OpenCL only. Generate kernel argument metadata.">,
  780. MarshallingInfoFlag<CodeGenOpts<"EmitOpenCLArgMetadata">>;
  781. def cl_unsafe_math_optimizations : Flag<["-"], "cl-unsafe-math-optimizations">, Group<opencl_Group>, Flags<[CC1Option]>,
  782. HelpText<"OpenCL only. Allow unsafe floating-point optimizations. Also implies -cl-no-signed-zeros and -cl-mad-enable.">,
  783. MarshallingInfoFlag<LangOpts<"CLUnsafeMath">>;
  784. def cl_fast_relaxed_math : Flag<["-"], "cl-fast-relaxed-math">, Group<opencl_Group>, Flags<[CC1Option]>,
  785. HelpText<"OpenCL only. Sets -cl-finite-math-only and -cl-unsafe-math-optimizations, and defines __FAST_RELAXED_MATH__.">,
  786. MarshallingInfoFlag<LangOpts<"FastRelaxedMath">>;
  787. def cl_mad_enable : Flag<["-"], "cl-mad-enable">, Group<opencl_Group>, Flags<[CC1Option]>,
  788. HelpText<"OpenCL only. Allow use of less precise MAD computations in the generated binary.">,
  789. MarshallingInfoFlag<CodeGenOpts<"LessPreciseFPMAD">>,
  790. ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, cl_fast_relaxed_math.KeyPath]>;
  791. def cl_no_signed_zeros : Flag<["-"], "cl-no-signed-zeros">, Group<opencl_Group>, Flags<[CC1Option]>,
  792. HelpText<"OpenCL only. Allow use of less precise no signed zeros computations in the generated binary.">,
  793. MarshallingInfoFlag<LangOpts<"CLNoSignedZero">>;
  794. def cl_std_EQ : Joined<["-"], "cl-std=">, Group<opencl_Group>, Flags<[CC1Option]>,
  795. HelpText<"OpenCL language standard to compile for.">,
  796. Values<"cl,CL,cl1.0,CL1.0,cl1.1,CL1.1,cl1.2,CL1.2,cl2.0,CL2.0,cl3.0,CL3.0,clc++,CLC++,clc++1.0,CLC++1.0,clc++2021,CLC++2021">;
  797. def cl_denorms_are_zero : Flag<["-"], "cl-denorms-are-zero">, Group<opencl_Group>,
  798. HelpText<"OpenCL only. Allow denormals to be flushed to zero.">;
  799. def cl_fp32_correctly_rounded_divide_sqrt : Flag<["-"], "cl-fp32-correctly-rounded-divide-sqrt">, Group<opencl_Group>, Flags<[CC1Option]>,
  800. HelpText<"OpenCL only. Specify that single precision floating-point divide and sqrt used in the program source are correctly rounded.">,
  801. MarshallingInfoFlag<CodeGenOpts<"OpenCLCorrectlyRoundedDivSqrt">>;
  802. def cl_uniform_work_group_size : Flag<["-"], "cl-uniform-work-group-size">, Group<opencl_Group>, Flags<[CC1Option]>,
  803. HelpText<"OpenCL only. Defines that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel">,
  804. MarshallingInfoFlag<CodeGenOpts<"UniformWGSize">>;
  805. def cl_no_stdinc : Flag<["-"], "cl-no-stdinc">, Group<opencl_Group>,
  806. HelpText<"OpenCL only. Disables all standard includes containing non-native compiler types and functions.">;
  807. def cl_ext_EQ : CommaJoined<["-"], "cl-ext=">, Group<opencl_Group>, Flags<[CC1Option]>,
  808. HelpText<"OpenCL only. Enable or disable OpenCL extensions/optional features. The argument is a comma-separated "
  809. "sequence of one or more extension names, each prefixed by '+' or '-'.">,
  810. MarshallingInfoStringVector<TargetOpts<"OpenCLExtensionsAsWritten">>;
  811. def client__name : JoinedOrSeparate<["-"], "client_name">;
  812. def combine : Flag<["-", "--"], "combine">, Flags<[NoXarchOption, Unsupported]>;
  813. def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">;
  814. def config : Joined<["--"], "config=">, Flags<[NoXarchOption, CoreOption]>, MetaVarName<"<file>">,
  815. HelpText<"Specify configuration file">;
  816. def : Separate<["--"], "config">, Alias<config>;
  817. def no_default_config : Flag<["--"], "no-default-config">, Flags<[NoXarchOption, CoreOption]>,
  818. HelpText<"Disable loading default configuration files">;
  819. def config_system_dir_EQ : Joined<["--"], "config-system-dir=">, Flags<[NoXarchOption, CoreOption, HelpHidden]>,
  820. HelpText<"System directory for configuration files">;
  821. def config_user_dir_EQ : Joined<["--"], "config-user-dir=">, Flags<[NoXarchOption, CoreOption, HelpHidden]>,
  822. HelpText<"User directory for configuration files">;
  823. def coverage : Flag<["-", "--"], "coverage">, Group<Link_Group>, Flags<[CoreOption]>;
  824. def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>;
  825. def current__version : JoinedOrSeparate<["-"], "current_version">;
  826. def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>,
  827. HelpText<"Add directory to the C++ SYSTEM include search path">, Flags<[CC1Option]>,
  828. MetaVarName<"<directory>">;
  829. def c : Flag<["-"], "c">, Flags<[NoXarchOption, FlangOption]>, Group<Action_Group>,
  830. HelpText<"Only run preprocess, compile, and assemble steps">;
  831. def fconvergent_functions : Flag<["-"], "fconvergent-functions">, Group<f_Group>, Flags<[CC1Option]>,
  832. HelpText<"Assume functions may be convergent">;
  833. def gpu_use_aux_triple_only : Flag<["--"], "gpu-use-aux-triple-only">,
  834. InternalDriverOpt, HelpText<"Prepare '-aux-triple' only without populating "
  835. "'-aux-target-cpu' and '-aux-target-feature'.">;
  836. def cuda_include_ptx_EQ : Joined<["--"], "cuda-include-ptx=">, Flags<[NoXarchOption]>,
  837. HelpText<"Include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
  838. def no_cuda_include_ptx_EQ : Joined<["--"], "no-cuda-include-ptx=">, Flags<[NoXarchOption]>,
  839. HelpText<"Do not include PTX for the following GPU architecture (e.g. sm_35) or 'all'. May be specified more than once.">;
  840. def offload_arch_EQ : Joined<["--"], "offload-arch=">, Flags<[NoXarchOption]>,
  841. HelpText<"Specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). "
  842. "If 'native' is used the compiler will detect locally installed architectures. "
  843. "For HIP offloading, the device architecture can be followed by target ID features "
  844. "delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once.">;
  845. def cuda_gpu_arch_EQ : Joined<["--"], "cuda-gpu-arch=">, Flags<[NoXarchOption]>,
  846. Alias<offload_arch_EQ>;
  847. def cuda_feature_EQ : Joined<["--"], "cuda-feature=">, HelpText<"Manually specify the CUDA feature to use">;
  848. def hip_link : Flag<["--"], "hip-link">,
  849. HelpText<"Link clang-offload-bundler bundles for HIP">;
  850. def no_hip_rt: Flag<["-"], "no-hip-rt">,
  851. HelpText<"Do not link against HIP runtime libraries">;
  852. def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">, Flags<[NoXarchOption]>,
  853. HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. "
  854. "'all' resets the list to its default value.">;
  855. def emit_static_lib : Flag<["--"], "emit-static-lib">,
  856. HelpText<"Enable linker job to emit a static library.">;
  857. def no_cuda_gpu_arch_EQ : Joined<["--"], "no-cuda-gpu-arch=">, Flags<[NoXarchOption]>,
  858. Alias<no_offload_arch_EQ>;
  859. def cuda_noopt_device_debug : Flag<["--"], "cuda-noopt-device-debug">,
  860. HelpText<"Enable device-side debug info generation. Disables ptxas optimizations.">;
  861. def no_cuda_version_check : Flag<["--"], "no-cuda-version-check">,
  862. HelpText<"Don't error out if the detected version of the CUDA install is "
  863. "too low for the requested CUDA gpu architecture.">;
  864. def no_cuda_noopt_device_debug : Flag<["--"], "no-cuda-noopt-device-debug">;
  865. def cuda_path_EQ : Joined<["--"], "cuda-path=">, Group<i_Group>,
  866. HelpText<"CUDA installation path">;
  867. def cuda_path_ignore_env : Flag<["--"], "cuda-path-ignore-env">, Group<i_Group>,
  868. HelpText<"Ignore environment variables to detect CUDA installation">;
  869. def ptxas_path_EQ : Joined<["--"], "ptxas-path=">, Group<i_Group>,
  870. HelpText<"Path to ptxas (used for compiling CUDA code)">;
  871. def fgpu_flush_denormals_to_zero : Flag<["-"], "fgpu-flush-denormals-to-zero">,
  872. HelpText<"Flush denormal floating point values to zero in CUDA/HIP device mode.">;
  873. def fno_gpu_flush_denormals_to_zero : Flag<["-"], "fno-gpu-flush-denormals-to-zero">;
  874. def fcuda_flush_denormals_to_zero : Flag<["-"], "fcuda-flush-denormals-to-zero">,
  875. Alias<fgpu_flush_denormals_to_zero>;
  876. def fno_cuda_flush_denormals_to_zero : Flag<["-"], "fno-cuda-flush-denormals-to-zero">,
  877. Alias<fno_gpu_flush_denormals_to_zero>;
  878. defm gpu_rdc : BoolFOption<"gpu-rdc",
  879. LangOpts<"GPURelocatableDeviceCode">, DefaultFalse,
  880. PosFlag<SetTrue, [CC1Option], "Generate relocatable device code, also known as separate compilation mode">,
  881. NegFlag<SetFalse>>;
  882. def : Flag<["-"], "fcuda-rdc">, Alias<fgpu_rdc>;
  883. def : Flag<["-"], "fno-cuda-rdc">, Alias<fno_gpu_rdc>;
  884. defm cuda_short_ptr : BoolFOption<"cuda-short-ptr",
  885. TargetOpts<"NVPTXUseShortPointers">, DefaultFalse,
  886. PosFlag<SetTrue, [CC1Option], "Use 32-bit pointers for accessing const/local/shared address spaces">,
  887. NegFlag<SetFalse>>;
  888. def fgpu_default_stream_EQ : Joined<["-"], "fgpu-default-stream=">,
  889. HelpText<"Specify default stream. The default value is 'legacy'. (HIP only)">,
  890. Flags<[CC1Option]>,
  891. Values<"legacy,per-thread">,
  892. NormalizedValuesScope<"LangOptions::GPUDefaultStreamKind">,
  893. NormalizedValues<["Legacy", "PerThread"]>,
  894. MarshallingInfoEnum<LangOpts<"GPUDefaultStream">, "Legacy">;
  895. def rocm_path_EQ : Joined<["--"], "rocm-path=">, Group<i_Group>,
  896. HelpText<"ROCm installation path, used for finding and automatically linking required bitcode libraries.">;
  897. def hip_path_EQ : Joined<["--"], "hip-path=">, Group<i_Group>,
  898. HelpText<"HIP runtime installation path, used for finding HIP version and adding HIP include path.">;
  899. def amdgpu_arch_tool_EQ : Joined<["--"], "amdgpu-arch-tool=">, Group<i_Group>,
  900. HelpText<"Tool used for detecting AMD GPU arch in the system.">;
  901. def nvptx_arch_tool_EQ : Joined<["--"], "nvptx-arch-tool=">, Group<i_Group>,
  902. HelpText<"Tool used for detecting NVIDIA GPU arch in the system.">;
  903. def rocm_device_lib_path_EQ : Joined<["--"], "rocm-device-lib-path=">, Group<Link_Group>,
  904. HelpText<"ROCm device library path. Alternative to rocm-path.">;
  905. def : Joined<["--"], "hip-device-lib-path=">, Alias<rocm_device_lib_path_EQ>;
  906. def hip_device_lib_EQ : Joined<["--"], "hip-device-lib=">, Group<Link_Group>,
  907. HelpText<"HIP device library">;
  908. def hip_version_EQ : Joined<["--"], "hip-version=">,
  909. HelpText<"HIP version in the format of major.minor.patch">;
  910. def fhip_dump_offload_linker_script : Flag<["-"], "fhip-dump-offload-linker-script">,
  911. Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>;
  912. defm hip_new_launch_api : BoolFOption<"hip-new-launch-api",
  913. LangOpts<"HIPUseNewLaunchAPI">, DefaultFalse,
  914. PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
  915. BothFlags<[], " new kernel launching API for HIP">>;
  916. defm hip_fp32_correctly_rounded_divide_sqrt : BoolFOption<"hip-fp32-correctly-rounded-divide-sqrt",
  917. CodeGenOpts<"HIPCorrectlyRoundedDivSqrt">, DefaultTrue,
  918. PosFlag<SetTrue, [], "Specify">,
  919. NegFlag<SetFalse, [CC1Option], "Don't specify">,
  920. BothFlags<[], " that single precision floating-point divide and sqrt used in "
  921. "the program source are correctly rounded (HIP device compilation only)">>,
  922. ShouldParseIf<hip.KeyPath>;
  923. defm hip_kernel_arg_name : BoolFOption<"hip-kernel-arg-name",
  924. CodeGenOpts<"HIPSaveKernelArgName">, DefaultFalse,
  925. PosFlag<SetTrue, [CC1Option], "Specify">,
  926. NegFlag<SetFalse, [], "Don't specify">,
  927. BothFlags<[], " that kernel argument names are preserved (HIP only)">>,
  928. ShouldParseIf<hip.KeyPath>;
  929. def hipspv_pass_plugin_EQ : Joined<["--"], "hipspv-pass-plugin=">,
  930. Group<Link_Group>, MetaVarName<"<dsopath>">,
  931. HelpText<"path to a pass plugin for HIP to SPIR-V passes.">;
  932. defm gpu_allow_device_init : BoolFOption<"gpu-allow-device-init",
  933. LangOpts<"GPUAllowDeviceInit">, DefaultFalse,
  934. PosFlag<SetTrue, [CC1Option], "Allow">, NegFlag<SetFalse, [], "Don't allow">,
  935. BothFlags<[], " device side init function in HIP (experimental)">>,
  936. ShouldParseIf<hip.KeyPath>;
  937. defm gpu_defer_diag : BoolFOption<"gpu-defer-diag",
  938. LangOpts<"GPUDeferDiag">, DefaultFalse,
  939. PosFlag<SetTrue, [CC1Option], "Defer">, NegFlag<SetFalse, [], "Don't defer">,
  940. BothFlags<[], " host/device related diagnostic messages for CUDA/HIP">>;
  941. defm gpu_exclude_wrong_side_overloads : BoolFOption<"gpu-exclude-wrong-side-overloads",
  942. LangOpts<"GPUExcludeWrongSideOverloads">, DefaultFalse,
  943. PosFlag<SetTrue, [CC1Option], "Always exclude wrong side overloads">,
  944. NegFlag<SetFalse, [], "Exclude wrong side overloads only if there are same side overloads">,
  945. BothFlags<[HelpHidden], " in overloading resolution for CUDA/HIP">>;
  946. def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">,
  947. Flags<[CC1Option]>,
  948. HelpText<"Default max threads per block for kernel launch bounds for HIP">,
  949. MarshallingInfoInt<LangOpts<"GPUMaxThreadsPerBlock">, "1024">,
  950. ShouldParseIf<hip.KeyPath>;
  951. def fgpu_inline_threshold_EQ : Joined<["-"], "fgpu-inline-threshold=">,
  952. Flags<[HelpHidden]>,
  953. HelpText<"Inline threshold for device compilation for CUDA/HIP">;
  954. def gpu_instrument_lib_EQ : Joined<["--"], "gpu-instrument-lib=">,
  955. HelpText<"Instrument device library for HIP, which is a LLVM bitcode containing "
  956. "__cyg_profile_func_enter and __cyg_profile_func_exit">;
  957. def fgpu_sanitize : Flag<["-"], "fgpu-sanitize">, Group<f_Group>,
  958. HelpText<"Enable sanitizer for AMDGPU target">;
  959. def fno_gpu_sanitize : Flag<["-"], "fno-gpu-sanitize">, Group<f_Group>;
  960. def gpu_bundle_output : Flag<["--"], "gpu-bundle-output">,
  961. Group<f_Group>, HelpText<"Bundle output files of HIP device compilation">;
  962. def no_gpu_bundle_output : Flag<["--"], "no-gpu-bundle-output">,
  963. Group<f_Group>, HelpText<"Do not bundle output files of HIP device compilation">;
  964. def cuid_EQ : Joined<["-"], "cuid=">, Flags<[CC1Option]>,
  965. HelpText<"An ID for compilation unit, which should be the same for the same "
  966. "compilation unit but different for different compilation units. "
  967. "It is used to externalize device-side static variables for single "
  968. "source offloading languages CUDA and HIP so that they can be "
  969. "accessed by the host code of the same compilation unit.">,
  970. MarshallingInfoString<LangOpts<"CUID">>;
  971. def fuse_cuid_EQ : Joined<["-"], "fuse-cuid=">,
  972. HelpText<"Method to generate ID's for compilation units for single source "
  973. "offloading languages CUDA and HIP: 'hash' (ID's generated by hashing "
  974. "file path and command line options) | 'random' (ID's generated as "
  975. "random numbers) | 'none' (disabled). Default is 'hash'. This option "
  976. "will be overridden by option '-cuid=[ID]' if it is specified." >;
  977. def libomptarget_amdgpu_bc_path_EQ : Joined<["--"], "libomptarget-amdgpu-bc-path=">, Group<i_Group>,
  978. HelpText<"Path to libomptarget-amdgcn bitcode library">;
  979. def libomptarget_amdgcn_bc_path_EQ : Joined<["--"], "libomptarget-amdgcn-bc-path=">, Group<i_Group>,
  980. HelpText<"Path to libomptarget-amdgcn bitcode library">, Alias<libomptarget_amdgpu_bc_path_EQ>;
  981. def libomptarget_nvptx_bc_path_EQ : Joined<["--"], "libomptarget-nvptx-bc-path=">, Group<i_Group>,
  982. HelpText<"Path to libomptarget-nvptx bitcode library">;
  983. def dD : Flag<["-"], "dD">, Group<d_Group>, Flags<[CC1Option]>,
  984. HelpText<"Print macro definitions in -E mode in addition to normal output">;
  985. def dI : Flag<["-"], "dI">, Group<d_Group>, Flags<[CC1Option]>,
  986. HelpText<"Print include directives in -E mode in addition to normal output">,
  987. MarshallingInfoFlag<PreprocessorOutputOpts<"ShowIncludeDirectives">>;
  988. def dM : Flag<["-"], "dM">, Group<d_Group>, Flags<[CC1Option]>,
  989. HelpText<"Print macro definitions in -E mode instead of normal output">;
  990. def dead__strip : Flag<["-"], "dead_strip">;
  991. def dependency_file : Separate<["-"], "dependency-file">, Flags<[CC1Option]>,
  992. HelpText<"Filename (or -) to write dependency output to">,
  993. MarshallingInfoString<DependencyOutputOpts<"OutputFile">>;
  994. def dependency_dot : Separate<["-"], "dependency-dot">, Flags<[CC1Option]>,
  995. HelpText<"Filename to write DOT-formatted header dependencies to">,
  996. MarshallingInfoString<DependencyOutputOpts<"DOTOutputFile">>;
  997. def module_dependency_dir : Separate<["-"], "module-dependency-dir">,
  998. Flags<[CC1Option]>, HelpText<"Directory to dump module dependencies to">,
  999. MarshallingInfoString<DependencyOutputOpts<"ModuleDependencyOutputDir">>;
  1000. def dsym_dir : JoinedOrSeparate<["-"], "dsym-dir">,
  1001. Flags<[NoXarchOption, RenderAsInput]>,
  1002. HelpText<"Directory to output dSYM's (if any) to">, MetaVarName<"<dir>">;
  1003. def dumpmachine : Flag<["-"], "dumpmachine">;
  1004. def dumpspecs : Flag<["-"], "dumpspecs">, Flags<[Unsupported]>;
  1005. def dumpversion : Flag<["-"], "dumpversion">;
  1006. def dylib__file : Separate<["-"], "dylib_file">;
  1007. def dylinker__install__name : JoinedOrSeparate<["-"], "dylinker_install_name">;
  1008. def dylinker : Flag<["-"], "dylinker">;
  1009. def dynamiclib : Flag<["-"], "dynamiclib">;
  1010. def dynamic : Flag<["-"], "dynamic">, Flags<[NoArgumentUnused]>;
  1011. def d_Flag : Flag<["-"], "d">, Group<d_Group>;
  1012. def d_Joined : Joined<["-"], "d">, Group<d_Group>;
  1013. def emit_ast : Flag<["-"], "emit-ast">, Flags<[CoreOption]>,
  1014. HelpText<"Emit Clang AST files for source inputs">;
  1015. def emit_llvm : Flag<["-"], "emit-llvm">, Flags<[CC1Option, FC1Option, FlangOption]>, Group<Action_Group>,
  1016. HelpText<"Use the LLVM representation for assembler and object files">;
  1017. def emit_interface_stubs : Flag<["-"], "emit-interface-stubs">, Flags<[CC1Option]>, Group<Action_Group>,
  1018. HelpText<"Generate Interface Stub Files.">;
  1019. def emit_merged_ifs : Flag<["-"], "emit-merged-ifs">,
  1020. Flags<[CC1Option]>, Group<Action_Group>,
  1021. HelpText<"Generate Interface Stub Files, emit merged text not binary.">;
  1022. def end_no_unused_arguments : Flag<["--"], "end-no-unused-arguments">, Flags<[CoreOption]>,
  1023. HelpText<"Start emitting warnings for unused driver arguments">;
  1024. def interface_stub_version_EQ : JoinedOrSeparate<["-"], "interface-stub-version=">, Flags<[CC1Option]>;
  1025. def exported__symbols__list : Separate<["-"], "exported_symbols_list">;
  1026. def extract_api : Flag<["-"], "extract-api">, Flags<[CC1Option]>, Group<Action_Group>,
  1027. HelpText<"Extract API information">;
  1028. def product_name_EQ: Joined<["--"], "product-name=">, Flags<[CC1Option]>,
  1029. MarshallingInfoString<FrontendOpts<"ProductName">>;
  1030. def extract_api_ignores_EQ: Joined<["--"], "extract-api-ignores=">, Flags<[CC1Option]>,
  1031. HelpText<"File containing a new line separated list of API symbols to ignore when extracting API information.">,
  1032. MarshallingInfoString<FrontendOpts<"ExtractAPIIgnoresFile">>;
  1033. def e : JoinedOrSeparate<["-"], "e">, Flags<[LinkerInput]>, Group<Link_Group>;
  1034. def fmax_tokens_EQ : Joined<["-"], "fmax-tokens=">, Group<f_Group>, Flags<[CC1Option]>,
  1035. HelpText<"Max total number of preprocessed tokens for -Wmax-tokens.">,
  1036. MarshallingInfoInt<LangOpts<"MaxTokens">>;
  1037. def fPIC : Flag<["-"], "fPIC">, Group<f_Group>;
  1038. def fno_PIC : Flag<["-"], "fno-PIC">, Group<f_Group>;
  1039. def fPIE : Flag<["-"], "fPIE">, Group<f_Group>;
  1040. def fno_PIE : Flag<["-"], "fno-PIE">, Group<f_Group>;
  1041. defm access_control : BoolFOption<"access-control",
  1042. LangOpts<"AccessControl">, DefaultTrue,
  1043. NegFlag<SetFalse, [CC1Option], "Disable C++ access control">,
  1044. PosFlag<SetTrue>>;
  1045. def falign_functions : Flag<["-"], "falign-functions">, Group<f_Group>;
  1046. def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<f_Group>;
  1047. def falign_loops_EQ : Joined<["-"], "falign-loops=">, Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">,
  1048. HelpText<"N must be a power of two. Align loops to the boundary">,
  1049. MarshallingInfoInt<CodeGenOpts<"LoopAlignment">>;
  1050. def fno_align_functions: Flag<["-"], "fno-align-functions">, Group<f_Group>;
  1051. defm allow_editor_placeholders : BoolFOption<"allow-editor-placeholders",
  1052. LangOpts<"AllowEditorPlaceholders">, DefaultFalse,
  1053. PosFlag<SetTrue, [CC1Option], "Treat editor placeholders as valid source code">,
  1054. NegFlag<SetFalse>>;
  1055. def fallow_unsupported : Flag<["-"], "fallow-unsupported">, Group<f_Group>;
  1056. def fapple_kext : Flag<["-"], "fapple-kext">, Group<f_Group>, Flags<[CC1Option]>,
  1057. HelpText<"Use Apple's kernel extensions ABI">,
  1058. MarshallingInfoFlag<LangOpts<"AppleKext">>;
  1059. def fstrict_flex_arrays_EQ : Joined<["-"], "fstrict-flex-arrays=">, Group<f_Group>,
  1060. MetaVarName<"<n>">, Values<"0,1,2,3">,
  1061. LangOpts<"StrictFlexArraysLevel">,
  1062. Flags<[CC1Option]>,
  1063. NormalizedValuesScope<"LangOptions::StrictFlexArraysLevelKind">,
  1064. NormalizedValues<["Default", "OneZeroOrIncomplete", "ZeroOrIncomplete", "IncompleteOnly"]>,
  1065. HelpText<"Enable optimizations based on the strict definition of flexible arrays">,
  1066. MarshallingInfoEnum<LangOpts<"StrictFlexArraysLevel">, "Default">;
  1067. defm apple_pragma_pack : BoolFOption<"apple-pragma-pack",
  1068. LangOpts<"ApplePragmaPack">, DefaultFalse,
  1069. PosFlag<SetTrue, [CC1Option], "Enable Apple gcc-compatible #pragma pack handling">,
  1070. NegFlag<SetFalse>>;
  1071. defm xl_pragma_pack : BoolFOption<"xl-pragma-pack",
  1072. LangOpts<"XLPragmaPack">, DefaultFalse,
  1073. PosFlag<SetTrue, [CC1Option], "Enable IBM XL #pragma pack handling">,
  1074. NegFlag<SetFalse>>;
  1075. def shared_libsan : Flag<["-"], "shared-libsan">,
  1076. HelpText<"Dynamically link the sanitizer runtime">;
  1077. def static_libsan : Flag<["-"], "static-libsan">,
  1078. HelpText<"Statically link the sanitizer runtime">;
  1079. def : Flag<["-"], "shared-libasan">, Alias<shared_libsan>;
  1080. def fasm : Flag<["-"], "fasm">, Group<f_Group>;
  1081. def fassume_sane_operator_new : Flag<["-"], "fassume-sane-operator-new">, Group<f_Group>;
  1082. def fastcp : Flag<["-"], "fastcp">, Group<f_Group>;
  1083. def fastf : Flag<["-"], "fastf">, Group<f_Group>;
  1084. def fast : Flag<["-"], "fast">, Group<f_Group>;
  1085. def fasynchronous_unwind_tables : Flag<["-"], "fasynchronous-unwind-tables">, Group<f_Group>;
  1086. defm double_square_bracket_attributes : BoolFOption<"double-square-bracket-attributes",
  1087. LangOpts<"DoubleSquareBracketAttributes">, Default<!strconcat(cpp11.KeyPath, "||", c2x.KeyPath)>,
  1088. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
  1089. BothFlags<[NoXarchOption, CC1Option], " '[[]]' attributes in all C and C++ language modes">>;
  1090. defm autolink : BoolFOption<"autolink",
  1091. CodeGenOpts<"Autolink">, DefaultTrue,
  1092. NegFlag<SetFalse, [CC1Option], "Disable generation of linker directives for automatic library linking">,
  1093. PosFlag<SetTrue>>;
  1094. // In the future this option will be supported by other offloading
  1095. // languages and accept other values such as CPU/GPU architectures,
  1096. // offload kinds and target aliases.
  1097. def offload_EQ : CommaJoined<["--"], "offload=">, Flags<[NoXarchOption]>,
  1098. HelpText<"Specify comma-separated list of offloading target triples (CUDA and HIP only)">;
  1099. // C++ Coroutines TS
  1100. defm coroutines_ts : BoolFOption<"coroutines-ts",
  1101. LangOpts<"Coroutines">, Default<cpp20.KeyPath>,
  1102. PosFlag<SetTrue, [CC1Option], "Enable support for the C++ Coroutines TS">,
  1103. NegFlag<SetFalse>>;
  1104. defm coro_aligned_allocation : BoolFOption<"coro-aligned-allocation",
  1105. LangOpts<"CoroAlignedAllocation">, DefaultFalse,
  1106. PosFlag<SetTrue, [CC1Option], "Prefer aligned allocation for C++ Coroutines">,
  1107. NegFlag<SetFalse>>;
  1108. defm experimental_library : BoolFOption<"experimental-library",
  1109. LangOpts<"ExperimentalLibrary">, DefaultFalse,
  1110. PosFlag<SetTrue, [CC1Option, CoreOption], "Control whether unstable and experimental library features are enabled. "
  1111. "This option enables various library features that are either experimental (also known as TSes), or have been "
  1112. "but are not stable yet in the selected Standard Library implementation. It is not recommended to use this option "
  1113. "in production code, since neither ABI nor API stability are guaranteed. This is intended to provide a preview "
  1114. "of features that will ship in the future for experimentation purposes">,
  1115. NegFlag<SetFalse>>;
  1116. def fembed_offload_object_EQ : Joined<["-"], "fembed-offload-object=">,
  1117. Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
  1118. HelpText<"Embed Offloading device-side binary into host object file as a section.">,
  1119. MarshallingInfoStringVector<CodeGenOpts<"OffloadObjects">>;
  1120. def fembed_bitcode_EQ : Joined<["-"], "fembed-bitcode=">,
  1121. Group<f_Group>, Flags<[NoXarchOption, CC1Option, CC1AsOption]>, MetaVarName<"<option>">,
  1122. HelpText<"Embed LLVM bitcode">,
  1123. Values<"off,all,bitcode,marker">, NormalizedValuesScope<"CodeGenOptions">,
  1124. NormalizedValues<["Embed_Off", "Embed_All", "Embed_Bitcode", "Embed_Marker"]>,
  1125. MarshallingInfoEnum<CodeGenOpts<"EmbedBitcode">, "Embed_Off">;
  1126. def fembed_bitcode : Flag<["-"], "fembed-bitcode">, Group<f_Group>,
  1127. Alias<fembed_bitcode_EQ>, AliasArgs<["all"]>,
  1128. HelpText<"Embed LLVM IR bitcode as data">;
  1129. def fembed_bitcode_marker : Flag<["-"], "fembed-bitcode-marker">,
  1130. Alias<fembed_bitcode_EQ>, AliasArgs<["marker"]>,
  1131. HelpText<"Embed placeholder LLVM IR data as a marker">;
  1132. defm gnu_inline_asm : BoolFOption<"gnu-inline-asm",
  1133. LangOpts<"GNUAsm">, DefaultTrue,
  1134. NegFlag<SetFalse, [CC1Option], "Disable GNU style inline asm">, PosFlag<SetTrue>>;
  1135. def fprofile_sample_use : Flag<["-"], "fprofile-sample-use">, Group<f_Group>,
  1136. Flags<[CoreOption]>;
  1137. def fno_profile_sample_use : Flag<["-"], "fno-profile-sample-use">, Group<f_Group>,
  1138. Flags<[CoreOption]>;
  1139. def fprofile_sample_use_EQ : Joined<["-"], "fprofile-sample-use=">,
  1140. Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
  1141. HelpText<"Enable sample-based profile guided optimizations">,
  1142. MarshallingInfoString<CodeGenOpts<"SampleProfileFile">>;
  1143. def fprofile_sample_accurate : Flag<["-"], "fprofile-sample-accurate">,
  1144. Group<f_Group>, Flags<[NoXarchOption, CC1Option]>,
  1145. HelpText<"Specifies that the sample profile is accurate">,
  1146. DocBrief<[{Specifies that the sample profile is accurate. If the sample
  1147. profile is accurate, callsites without profile samples are marked
  1148. as cold. Otherwise, treat callsites without profile samples as if
  1149. we have no profile}]>,
  1150. MarshallingInfoFlag<CodeGenOpts<"ProfileSampleAccurate">>;
  1151. def fsample_profile_use_profi : Flag<["-"], "fsample-profile-use-profi">,
  1152. Flags<[NoXarchOption, CC1Option]>, Group<f_Group>,
  1153. HelpText<"Use profi to infer block and edge counts">,
  1154. DocBrief<[{Infer block and edge counts. If the profiles have errors or missing
  1155. blocks caused by sampling, profile inference (profi) can convert
  1156. basic block counts to branch probabilites to fix them by extended
  1157. and re-engineered classic MCMF (min-cost max-flow) approach.}]>;
  1158. def fno_profile_sample_accurate : Flag<["-"], "fno-profile-sample-accurate">,
  1159. Group<f_Group>, Flags<[NoXarchOption]>;
  1160. def fauto_profile : Flag<["-"], "fauto-profile">, Group<f_Group>,
  1161. Alias<fprofile_sample_use>;
  1162. def fno_auto_profile : Flag<["-"], "fno-auto-profile">, Group<f_Group>,
  1163. Alias<fno_profile_sample_use>;
  1164. def fauto_profile_EQ : Joined<["-"], "fauto-profile=">,
  1165. Alias<fprofile_sample_use_EQ>;
  1166. def fauto_profile_accurate : Flag<["-"], "fauto-profile-accurate">,
  1167. Group<f_Group>, Alias<fprofile_sample_accurate>;
  1168. def fno_auto_profile_accurate : Flag<["-"], "fno-auto-profile-accurate">,
  1169. Group<f_Group>, Alias<fno_profile_sample_accurate>;
  1170. def fdebug_compilation_dir_EQ : Joined<["-"], "fdebug-compilation-dir=">,
  1171. Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
  1172. HelpText<"The compilation directory to embed in the debug info">,
  1173. MarshallingInfoString<CodeGenOpts<"DebugCompilationDir">>;
  1174. def fdebug_compilation_dir : Separate<["-"], "fdebug-compilation-dir">,
  1175. Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
  1176. Alias<fdebug_compilation_dir_EQ>;
  1177. def fcoverage_compilation_dir_EQ : Joined<["-"], "fcoverage-compilation-dir=">,
  1178. Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>,
  1179. HelpText<"The compilation directory to embed in the coverage mapping.">,
  1180. MarshallingInfoString<CodeGenOpts<"CoverageCompilationDir">>;
  1181. def ffile_compilation_dir_EQ : Joined<["-"], "ffile-compilation-dir=">, Group<f_Group>,
  1182. Flags<[CoreOption]>,
  1183. HelpText<"The compilation directory to embed in the debug info and coverage mapping.">;
  1184. defm debug_info_for_profiling : BoolFOption<"debug-info-for-profiling",
  1185. CodeGenOpts<"DebugInfoForProfiling">, DefaultFalse,
  1186. PosFlag<SetTrue, [CC1Option], "Emit extra debug info to make sample profile more accurate">,
  1187. NegFlag<SetFalse>>;
  1188. def fprofile_instr_generate : Flag<["-"], "fprofile-instr-generate">,
  1189. Group<f_Group>, Flags<[CoreOption]>,
  1190. HelpText<"Generate instrumented code to collect execution counts into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
  1191. def fprofile_instr_generate_EQ : Joined<["-"], "fprofile-instr-generate=">,
  1192. Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<file>">,
  1193. HelpText<"Generate instrumented code to collect execution counts into <file> (overridden by LLVM_PROFILE_FILE env var)">;
  1194. def fprofile_instr_use : Flag<["-"], "fprofile-instr-use">, Group<f_Group>,
  1195. Flags<[CoreOption]>;
  1196. def fprofile_instr_use_EQ : Joined<["-"], "fprofile-instr-use=">,
  1197. Group<f_Group>, Flags<[CoreOption]>,
  1198. HelpText<"Use instrumentation data for profile-guided optimization">;
  1199. def fprofile_remapping_file_EQ : Joined<["-"], "fprofile-remapping-file=">,
  1200. Group<f_Group>, Flags<[CC1Option, CoreOption]>, MetaVarName<"<file>">,
  1201. HelpText<"Use the remappings described in <file> to match the profile data against names in the program">,
  1202. MarshallingInfoString<CodeGenOpts<"ProfileRemappingFile">>;
  1203. defm coverage_mapping : BoolFOption<"coverage-mapping",
  1204. CodeGenOpts<"CoverageMapping">, DefaultFalse,
  1205. PosFlag<SetTrue, [CC1Option], "Generate coverage mapping to enable code coverage analysis">,
  1206. NegFlag<SetFalse, [], "Disable code coverage analysis">, BothFlags<[CoreOption]>>;
  1207. def fprofile_generate : Flag<["-"], "fprofile-generate">,
  1208. Group<f_Group>, Flags<[CoreOption]>,
  1209. HelpText<"Generate instrumented code to collect execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
  1210. def fprofile_generate_EQ : Joined<["-"], "fprofile-generate=">,
  1211. Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
  1212. HelpText<"Generate instrumented code to collect execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
  1213. def fcs_profile_generate : Flag<["-"], "fcs-profile-generate">,
  1214. Group<f_Group>, Flags<[CoreOption]>,
  1215. HelpText<"Generate instrumented code to collect context sensitive execution counts into default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
  1216. def fcs_profile_generate_EQ : Joined<["-"], "fcs-profile-generate=">,
  1217. Group<f_Group>, Flags<[CoreOption]>, MetaVarName<"<directory>">,
  1218. HelpText<"Generate instrumented code to collect context sensitive execution counts into <directory>/default.profraw (overridden by LLVM_PROFILE_FILE env var)">;
  1219. def fprofile_use : Flag<["-"], "fprofile-use">, Group<f_Group>,
  1220. Flags<[CoreOption]>, Alias<fprofile_instr_use>;
  1221. def fprofile_use_EQ : Joined<["-"], "fprofile-use=">,
  1222. Group<f_Group>, Flags<[NoXarchOption, CoreOption]>,
  1223. MetaVarName<"<pathname>">,
  1224. HelpText<"Use instrumentation data for profile-guided optimization. If pathname is a directory, it reads from <pathname>/default.profdata. Otherwise, it reads from file <pathname>.">;
  1225. def fno_profile_instr_generate : Flag<["-"], "fno-profile-instr-generate">,
  1226. Group<f_Group>, Flags<[CoreOption]>,
  1227. HelpText<"Disable generation of profile instrumentation.">;
  1228. def fno_profile_generate : Flag<["-"], "fno-profile-generate">,
  1229. Group<f_Group>, Flags<[CoreOption]>,
  1230. HelpText<"Disable generation of profile instrumentation.">;
  1231. def fno_profile_instr_use : Flag<["-"], "fno-profile-instr-use">,
  1232. Group<f_Group>, Flags<[CoreOption]>,
  1233. HelpText<"Disable using instrumentation data for profile-guided optimization">;
  1234. def fno_profile_use : Flag<["-"], "fno-profile-use">,
  1235. Alias<fno_profile_instr_use>;
  1236. defm profile_arcs : BoolFOption<"profile-arcs",
  1237. CodeGenOpts<"EmitGcovArcs">, DefaultFalse,
  1238. PosFlag<SetTrue, [CC1Option, LinkOption]>, NegFlag<SetFalse>>;
  1239. defm test_coverage : BoolFOption<"test-coverage",
  1240. CodeGenOpts<"EmitGcovNotes">, DefaultFalse,
  1241. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
  1242. def fprofile_filter_files_EQ : Joined<["-"], "fprofile-filter-files=">,
  1243. Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  1244. HelpText<"Instrument only functions from files where names match any regex separated by a semi-colon">,
  1245. MarshallingInfoString<CodeGenOpts<"ProfileFilterFiles">>,
  1246. ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
  1247. def fprofile_exclude_files_EQ : Joined<["-"], "fprofile-exclude-files=">,
  1248. Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  1249. HelpText<"Instrument only functions from files where names don't match all the regexes separated by a semi-colon">,
  1250. MarshallingInfoString<CodeGenOpts<"ProfileExcludeFiles">>,
  1251. ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
  1252. def fprofile_update_EQ : Joined<["-"], "fprofile-update=">,
  1253. Group<f_Group>, Flags<[CC1Option, CoreOption]>, Values<"atomic,prefer-atomic,single">,
  1254. MetaVarName<"<method>">, HelpText<"Set update method of profile counters">,
  1255. MarshallingInfoFlag<CodeGenOpts<"AtomicProfileUpdate">>;
  1256. defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling",
  1257. CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse,
  1258. PosFlag<SetTrue, [], "Emit">, NegFlag<SetFalse, [], "Do not emit">,
  1259. BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiling">>;
  1260. def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">,
  1261. Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  1262. HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">;
  1263. def fprofile_list_EQ : Joined<["-"], "fprofile-list=">,
  1264. Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  1265. HelpText<"Filename defining the list of functions/files to instrument">,
  1266. MarshallingInfoStringVector<LangOpts<"ProfileListFiles">>;
  1267. def fprofile_function_groups : Joined<["-"], "fprofile-function-groups=">,
  1268. Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<N>">,
  1269. HelpText<"Partition functions into N groups and select only functions in group i to be instrumented using -fprofile-selected-function-group">,
  1270. MarshallingInfoInt<CodeGenOpts<"ProfileTotalFunctionGroups">, "1">;
  1271. def fprofile_selected_function_group :
  1272. Joined<["-"], "fprofile-selected-function-group=">, Group<f_Group>,
  1273. Flags<[CC1Option]>, MetaVarName<"<i>">,
  1274. HelpText<"Partition functions into N groups using -fprofile-function-groups and select only functions in group i to be instrumented. The valid range is 0 to N-1 inclusive">,
  1275. MarshallingInfoInt<CodeGenOpts<"ProfileSelectedFunctionGroup">>;
  1276. def fswift_async_fp_EQ : Joined<["-"], "fswift-async-fp=">,
  1277. Group<f_Group>, Flags<[CC1Option, CC1AsOption, CoreOption]>, MetaVarName<"<option>">,
  1278. HelpText<"Control emission of Swift async extended frame info">,
  1279. Values<"auto,always,never">,
  1280. NormalizedValuesScope<"CodeGenOptions::SwiftAsyncFramePointerKind">,
  1281. NormalizedValues<["Auto", "Always", "Never"]>,
  1282. MarshallingInfoEnum<CodeGenOpts<"SwiftAsyncFramePointer">, "Always">;
  1283. defm addrsig : BoolFOption<"addrsig",
  1284. CodeGenOpts<"Addrsig">, DefaultFalse,
  1285. PosFlag<SetTrue, [CC1Option], "Emit">, NegFlag<SetFalse, [], "Don't emit">,
  1286. BothFlags<[CoreOption], " an address-significance table">>;
  1287. defm blocks : OptInCC1FFlag<"blocks", "Enable the 'blocks' language feature", "", "", [CoreOption]>;
  1288. def fbootclasspath_EQ : Joined<["-"], "fbootclasspath=">, Group<f_Group>;
  1289. defm borland_extensions : BoolFOption<"borland-extensions",
  1290. LangOpts<"Borland">, DefaultFalse,
  1291. PosFlag<SetTrue, [CC1Option], "Accept non-standard constructs supported by the Borland compiler">,
  1292. NegFlag<SetFalse>>;
  1293. def fbuiltin : Flag<["-"], "fbuiltin">, Group<f_Group>, Flags<[CoreOption]>;
  1294. def fbuiltin_module_map : Flag <["-"], "fbuiltin-module-map">, Group<f_Group>,
  1295. Flags<[NoXarchOption]>, HelpText<"Load the clang builtins module map file.">;
  1296. defm caret_diagnostics : BoolFOption<"caret-diagnostics",
  1297. DiagnosticOpts<"ShowCarets">, DefaultTrue,
  1298. NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>;
  1299. def fclang_abi_compat_EQ : Joined<["-"], "fclang-abi-compat=">, Group<f_clang_Group>,
  1300. Flags<[CC1Option]>, MetaVarName<"<version>">, Values<"<major>.<minor>,latest">,
  1301. HelpText<"Attempt to match the ABI of Clang <version>">;
  1302. def fclasspath_EQ : Joined<["-"], "fclasspath=">, Group<f_Group>;
  1303. def fcolor_diagnostics : Flag<["-"], "fcolor-diagnostics">, Group<f_Group>,
  1304. Flags<[CoreOption, CC1Option, FlangOption, FC1Option]>,
  1305. HelpText<"Enable colors in diagnostics">;
  1306. def fno_color_diagnostics : Flag<["-"], "fno-color-diagnostics">, Group<f_Group>,
  1307. Flags<[CoreOption, FlangOption]>, HelpText<"Disable colors in diagnostics">;
  1308. def : Flag<["-"], "fdiagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fcolor_diagnostics>;
  1309. def : Flag<["-"], "fno-diagnostics-color">, Group<f_Group>, Flags<[CoreOption]>, Alias<fno_color_diagnostics>;
  1310. def fdiagnostics_color_EQ : Joined<["-"], "fdiagnostics-color=">, Group<f_Group>;
  1311. def fansi_escape_codes : Flag<["-"], "fansi-escape-codes">, Group<f_Group>,
  1312. Flags<[CoreOption, CC1Option]>, HelpText<"Use ANSI escape codes for diagnostics">,
  1313. MarshallingInfoFlag<DiagnosticOpts<"UseANSIEscapeCodes">>;
  1314. def fcase_insensitive_paths : Flag<["-"], "fcase-insensitive-paths">, Group<f_Group>,
  1315. Flags<[CC1Option, CoreOption]>, HelpText<"Treat file paths as case-insensitive">;
  1316. def fcomment_block_commands : CommaJoined<["-"], "fcomment-block-commands=">, Group<f_clang_Group>, Flags<[CC1Option]>,
  1317. HelpText<"Treat each comma separated argument in <arg> as a documentation comment block command">,
  1318. MetaVarName<"<arg>">, MarshallingInfoStringVector<LangOpts<"CommentOpts.BlockCommandNames">>;
  1319. def fparse_all_comments : Flag<["-"], "fparse-all-comments">, Group<f_clang_Group>, Flags<[CC1Option]>,
  1320. MarshallingInfoFlag<LangOpts<"CommentOpts.ParseAllComments">>;
  1321. def frecord_command_line : Flag<["-"], "frecord-command-line">,
  1322. Group<f_clang_Group>;
  1323. def fno_record_command_line : Flag<["-"], "fno-record-command-line">,
  1324. Group<f_clang_Group>;
  1325. def : Flag<["-"], "frecord-gcc-switches">, Alias<frecord_command_line>;
  1326. def : Flag<["-"], "fno-record-gcc-switches">, Alias<fno_record_command_line>;
  1327. def fcommon : Flag<["-"], "fcommon">, Group<f_Group>,
  1328. Flags<[CoreOption, CC1Option]>, HelpText<"Place uninitialized global variables in a common block">,
  1329. MarshallingInfoNegativeFlag<CodeGenOpts<"NoCommon">>;
  1330. def fcompile_resource_EQ : Joined<["-"], "fcompile-resource=">, Group<f_Group>;
  1331. defm complete_member_pointers : BoolOption<"f", "complete-member-pointers",
  1332. LangOpts<"CompleteMemberPointers">, DefaultFalse,
  1333. PosFlag<SetTrue, [CC1Option], "Require">, NegFlag<SetFalse, [], "Do not require">,
  1334. BothFlags<[CoreOption], " member pointer base types to be complete if they"
  1335. " would be significant under the Microsoft ABI">>,
  1336. Group<f_clang_Group>;
  1337. def fcf_runtime_abi_EQ : Joined<["-"], "fcf-runtime-abi=">, Group<f_Group>,
  1338. Flags<[CC1Option]>, Values<"unspecified,standalone,objc,swift,swift-5.0,swift-4.2,swift-4.1">,
  1339. NormalizedValuesScope<"LangOptions::CoreFoundationABI">,
  1340. NormalizedValues<["ObjectiveC", "ObjectiveC", "ObjectiveC", "Swift5_0", "Swift5_0", "Swift4_2", "Swift4_1"]>,
  1341. MarshallingInfoEnum<LangOpts<"CFRuntime">, "ObjectiveC">;
  1342. defm constant_cfstrings : BoolFOption<"constant-cfstrings",
  1343. LangOpts<"NoConstantCFStrings">, DefaultFalse,
  1344. NegFlag<SetTrue, [CC1Option], "Disable creation of CodeFoundation-type constant strings">,
  1345. PosFlag<SetFalse>>;
  1346. def fconstant_string_class_EQ : Joined<["-"], "fconstant-string-class=">, Group<f_Group>;
  1347. def fconstexpr_depth_EQ : Joined<["-"], "fconstexpr-depth=">, Group<f_Group>;
  1348. def fconstexpr_steps_EQ : Joined<["-"], "fconstexpr-steps=">, Group<f_Group>;
  1349. def fexperimental_new_constant_interpreter : Flag<["-"], "fexperimental-new-constant-interpreter">, Group<f_Group>,
  1350. HelpText<"Enable the experimental new constant interpreter">, Flags<[CC1Option]>,
  1351. MarshallingInfoFlag<LangOpts<"EnableNewConstInterp">>;
  1352. def fconstexpr_backtrace_limit_EQ : Joined<["-"], "fconstexpr-backtrace-limit=">,
  1353. Group<f_Group>;
  1354. def fcrash_diagnostics_EQ : Joined<["-"], "fcrash-diagnostics=">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
  1355. HelpText<"Set level of crash diagnostic reporting, (option: off, compiler, all)">;
  1356. def fcrash_diagnostics : Flag<["-"], "fcrash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
  1357. HelpText<"Enable crash diagnostic reporting (default)">, Alias<fcrash_diagnostics_EQ>, AliasArgs<["compiler"]>;
  1358. def fno_crash_diagnostics : Flag<["-"], "fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
  1359. Alias<gen_reproducer_eq>, AliasArgs<["off"]>,
  1360. HelpText<"Disable auto-generation of preprocessed source files and a script for reproduction during a clang crash">;
  1361. def fcrash_diagnostics_dir : Joined<["-"], "fcrash-diagnostics-dir=">,
  1362. Group<f_clang_Group>, Flags<[NoArgumentUnused, CoreOption]>,
  1363. HelpText<"Put crash-report files in <dir>">, MetaVarName<"<dir>">;
  1364. def fcreate_profile : Flag<["-"], "fcreate-profile">, Group<f_Group>;
  1365. defm cxx_exceptions: BoolFOption<"cxx-exceptions",
  1366. LangOpts<"CXXExceptions">, DefaultFalse,
  1367. PosFlag<SetTrue, [CC1Option], "Enable C++ exceptions">, NegFlag<SetFalse>>;
  1368. defm async_exceptions: BoolFOption<"async-exceptions",
  1369. LangOpts<"EHAsynch">, DefaultFalse,
  1370. PosFlag<SetTrue, [CC1Option], "Enable EH Asynchronous exceptions">, NegFlag<SetFalse>>;
  1371. defm cxx_modules : BoolFOption<"cxx-modules",
  1372. LangOpts<"CPlusPlusModules">, Default<cpp20.KeyPath>,
  1373. NegFlag<SetFalse, [CC1Option], "Disable">, PosFlag<SetTrue, [], "Enable">,
  1374. BothFlags<[NoXarchOption], " modules for C++">>,
  1375. ShouldParseIf<cplusplus.KeyPath>;
  1376. def fdebug_pass_arguments : Flag<["-"], "fdebug-pass-arguments">, Group<f_Group>;
  1377. def fdebug_pass_structure : Flag<["-"], "fdebug-pass-structure">, Group<f_Group>;
  1378. def fdepfile_entry : Joined<["-"], "fdepfile-entry=">,
  1379. Group<f_clang_Group>, Flags<[CC1Option]>;
  1380. def fdiagnostics_fixit_info : Flag<["-"], "fdiagnostics-fixit-info">, Group<f_clang_Group>;
  1381. def fno_diagnostics_fixit_info : Flag<["-"], "fno-diagnostics-fixit-info">, Group<f_Group>,
  1382. Flags<[CC1Option]>, HelpText<"Do not include fixit information in diagnostics">,
  1383. MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowFixits">>;
  1384. def fdiagnostics_parseable_fixits : Flag<["-"], "fdiagnostics-parseable-fixits">, Group<f_clang_Group>,
  1385. Flags<[CoreOption, CC1Option]>, HelpText<"Print fix-its in machine parseable form">,
  1386. MarshallingInfoFlag<DiagnosticOpts<"ShowParseableFixits">>;
  1387. def fdiagnostics_print_source_range_info : Flag<["-"], "fdiagnostics-print-source-range-info">,
  1388. Group<f_clang_Group>, Flags<[CC1Option]>,
  1389. HelpText<"Print source range spans in numeric form">,
  1390. MarshallingInfoFlag<DiagnosticOpts<"ShowSourceRanges">>;
  1391. defm diagnostics_show_hotness : BoolFOption<"diagnostics-show-hotness",
  1392. CodeGenOpts<"DiagnosticsWithHotness">, DefaultFalse,
  1393. PosFlag<SetTrue, [CC1Option], "Enable profile hotness information in diagnostic line">,
  1394. NegFlag<SetFalse>>;
  1395. def fdiagnostics_hotness_threshold_EQ : Joined<["-"], "fdiagnostics-hotness-threshold=">,
  1396. Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
  1397. HelpText<"Prevent optimization remarks from being output if they do not have at least this profile count. "
  1398. "Use 'auto' to apply the threshold from profile summary">;
  1399. def fdiagnostics_misexpect_tolerance_EQ : Joined<["-"], "fdiagnostics-misexpect-tolerance=">,
  1400. Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<value>">,
  1401. HelpText<"Prevent misexpect diagnostics from being output if the profile counts are within N% of the expected. ">;
  1402. defm diagnostics_show_option : BoolFOption<"diagnostics-show-option",
  1403. DiagnosticOpts<"ShowOptionNames">, DefaultTrue,
  1404. NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue, [], "Print option name with mappable diagnostics">>;
  1405. defm diagnostics_show_note_include_stack : BoolFOption<"diagnostics-show-note-include-stack",
  1406. DiagnosticOpts<"ShowNoteIncludeStack">, DefaultFalse,
  1407. PosFlag<SetTrue, [], "Display include stacks for diagnostic notes">,
  1408. NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
  1409. def fdiagnostics_format_EQ : Joined<["-"], "fdiagnostics-format=">, Group<f_clang_Group>;
  1410. def fdiagnostics_show_category_EQ : Joined<["-"], "fdiagnostics-show-category=">, Group<f_clang_Group>;
  1411. def fdiagnostics_show_template_tree : Flag<["-"], "fdiagnostics-show-template-tree">,
  1412. Group<f_Group>, Flags<[CC1Option]>,
  1413. HelpText<"Print a template comparison tree for differing templates">,
  1414. MarshallingInfoFlag<DiagnosticOpts<"ShowTemplateTree">>;
  1415. def fdiscard_value_names : Flag<["-"], "fdiscard-value-names">, Group<f_clang_Group>,
  1416. HelpText<"Discard value names in LLVM IR">, Flags<[NoXarchOption]>;
  1417. def fno_discard_value_names : Flag<["-"], "fno-discard-value-names">, Group<f_clang_Group>,
  1418. HelpText<"Do not discard value names in LLVM IR">, Flags<[NoXarchOption]>;
  1419. defm dollars_in_identifiers : BoolFOption<"dollars-in-identifiers",
  1420. LangOpts<"DollarIdents">, Default<!strconcat("!", asm_preprocessor.KeyPath)>,
  1421. PosFlag<SetTrue, [], "Allow">, NegFlag<SetFalse, [], "Disallow">,
  1422. BothFlags<[CC1Option], " '$' in identifiers">>;
  1423. def fdwarf2_cfi_asm : Flag<["-"], "fdwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
  1424. def fno_dwarf2_cfi_asm : Flag<["-"], "fno-dwarf2-cfi-asm">, Group<clang_ignored_f_Group>;
  1425. defm dwarf_directory_asm : BoolFOption<"dwarf-directory-asm",
  1426. CodeGenOpts<"NoDwarfDirectoryAsm">, DefaultFalse,
  1427. NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>;
  1428. defm elide_constructors : BoolFOption<"elide-constructors",
  1429. LangOpts<"ElideConstructors">, DefaultTrue,
  1430. NegFlag<SetFalse, [CC1Option], "Disable C++ copy constructor elision">,
  1431. PosFlag<SetTrue>>;
  1432. def fno_elide_type : Flag<["-"], "fno-elide-type">, Group<f_Group>,
  1433. Flags<[CC1Option]>,
  1434. HelpText<"Do not elide types when printing diagnostics">,
  1435. MarshallingInfoNegativeFlag<DiagnosticOpts<"ElideType">>;
  1436. def feliminate_unused_debug_symbols : Flag<["-"], "feliminate-unused-debug-symbols">, Group<f_Group>;
  1437. defm eliminate_unused_debug_types : OptOutCC1FFlag<"eliminate-unused-debug-types",
  1438. "Do not emit ", "Emit ", " debug info for defined but unused types">;
  1439. def femit_all_decls : Flag<["-"], "femit-all-decls">, Group<f_Group>, Flags<[CC1Option]>,
  1440. HelpText<"Emit all declarations, even if unused">,
  1441. MarshallingInfoFlag<LangOpts<"EmitAllDecls">>;
  1442. defm emulated_tls : BoolFOption<"emulated-tls",
  1443. CodeGenOpts<"EmulatedTLS">, DefaultFalse,
  1444. PosFlag<SetTrue, [CC1Option], "Use emutls functions to access thread_local variables">,
  1445. NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
  1446. def fencoding_EQ : Joined<["-"], "fencoding=">, Group<f_Group>;
  1447. def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>;
  1448. defm exceptions : BoolFOption<"exceptions",
  1449. LangOpts<"Exceptions">, DefaultFalse,
  1450. PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
  1451. BothFlags<[], " support for exception handling">>;
  1452. def fdwarf_exceptions : Flag<["-"], "fdwarf-exceptions">, Group<f_Group>,
  1453. HelpText<"Use DWARF style exceptions">;
  1454. def fsjlj_exceptions : Flag<["-"], "fsjlj-exceptions">, Group<f_Group>,
  1455. HelpText<"Use SjLj style exceptions">;
  1456. def fseh_exceptions : Flag<["-"], "fseh-exceptions">, Group<f_Group>,
  1457. HelpText<"Use SEH style exceptions">;
  1458. def fwasm_exceptions : Flag<["-"], "fwasm-exceptions">, Group<f_Group>,
  1459. HelpText<"Use WebAssembly style exceptions">;
  1460. def exception_model : Separate<["-"], "exception-model">,
  1461. Flags<[CC1Option, NoDriverOption]>, HelpText<"The exception model">,
  1462. Values<"dwarf,sjlj,seh,wasm">,
  1463. NormalizedValuesScope<"LangOptions::ExceptionHandlingKind">,
  1464. NormalizedValues<["DwarfCFI", "SjLj", "WinEH", "Wasm"]>,
  1465. MarshallingInfoEnum<LangOpts<"ExceptionHandling">, "None">;
  1466. def exception_model_EQ : Joined<["-"], "exception-model=">,
  1467. Flags<[CC1Option, NoDriverOption]>, Alias<exception_model>;
  1468. def fignore_exceptions : Flag<["-"], "fignore-exceptions">, Group<f_Group>, Flags<[CC1Option]>,
  1469. HelpText<"Enable support for ignoring exception handling constructs">,
  1470. MarshallingInfoFlag<LangOpts<"IgnoreExceptions">>;
  1471. def fexcess_precision_EQ : Joined<["-"], "fexcess-precision=">, Group<f_Group>,
  1472. Flags<[CoreOption]>,
  1473. HelpText<"Allows control over excess precision on targets where native "
  1474. "support for the precision types is not available. By default, excess "
  1475. "precision is used to calculate intermediate results following the "
  1476. "rules specified in ISO C99.">,
  1477. Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">,
  1478. NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>;
  1479. def ffloat16_excess_precision_EQ : Joined<["-"], "ffloat16-excess-precision=">,
  1480. Group<f_Group>, Flags<[CC1Option, NoDriverOption]>,
  1481. HelpText<"Allows control over excess precision on targets where native "
  1482. "support for Float16 precision types is not available. By default, excess "
  1483. "precision is used to calculate intermediate results following the "
  1484. "rules specified in ISO C99.">,
  1485. Values<"standard,fast,none">, NormalizedValuesScope<"LangOptions">,
  1486. NormalizedValues<["FPP_Standard", "FPP_Fast", "FPP_None"]>,
  1487. MarshallingInfoEnum<LangOpts<"Float16ExcessPrecision">, "FPP_Standard">;
  1488. def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
  1489. def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>;
  1490. def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>;
  1491. def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
  1492. def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>;
  1493. def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>;
  1494. def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>;
  1495. def fhosted : Flag<["-"], "fhosted">, Group<f_Group>;
  1496. def fdenormal_fp_math_EQ : Joined<["-"], "fdenormal-fp-math=">, Group<f_Group>, Flags<[CC1Option]>;
  1497. def ffile_reproducible : Flag<["-"], "ffile-reproducible">, Group<f_Group>,
  1498. Flags<[CoreOption, CC1Option]>,
  1499. HelpText<"Use the target's platform-specific path separator character when "
  1500. "expanding the __FILE__ macro">;
  1501. def fno_file_reproducible : Flag<["-"], "fno-file-reproducible">,
  1502. Group<f_Group>, Flags<[CoreOption, CC1Option]>,
  1503. HelpText<"Use the host's platform-specific path separator character when "
  1504. "expanding the __FILE__ macro">;
  1505. def ffp_eval_method_EQ : Joined<["-"], "ffp-eval-method=">, Group<f_Group>, Flags<[CC1Option]>,
  1506. HelpText<"Specifies the evaluation method to use for floating-point arithmetic.">,
  1507. Values<"source,double,extended">, NormalizedValuesScope<"LangOptions">,
  1508. NormalizedValues<["FEM_Source", "FEM_Double", "FEM_Extended"]>,
  1509. MarshallingInfoEnum<LangOpts<"FPEvalMethod">, "FEM_UnsetOnCommandLine">;
  1510. def ffp_model_EQ : Joined<["-"], "ffp-model=">, Group<f_Group>, Flags<[NoXarchOption]>,
  1511. HelpText<"Controls the semantics of floating-point calculations.">;
  1512. def ffp_exception_behavior_EQ : Joined<["-"], "ffp-exception-behavior=">, Group<f_Group>, Flags<[CC1Option]>,
  1513. HelpText<"Specifies the exception behavior of floating-point operations.">,
  1514. Values<"ignore,maytrap,strict">, NormalizedValuesScope<"LangOptions">,
  1515. NormalizedValues<["FPE_Ignore", "FPE_MayTrap", "FPE_Strict"]>,
  1516. MarshallingInfoEnum<LangOpts<"FPExceptionMode">, "FPE_Default">;
  1517. defm fast_math : BoolFOption<"fast-math",
  1518. LangOpts<"FastMath">, DefaultFalse,
  1519. PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow aggressive, lossy floating-point optimizations",
  1520. [cl_fast_relaxed_math.KeyPath]>,
  1521. NegFlag<SetFalse>>;
  1522. defm math_errno : BoolFOption<"math-errno",
  1523. LangOpts<"MathErrno">, DefaultFalse,
  1524. PosFlag<SetTrue, [CC1Option], "Require math functions to indicate errors by setting errno">,
  1525. NegFlag<SetFalse>>,
  1526. ShouldParseIf<!strconcat("!", open_cl.KeyPath)>;
  1527. def fextend_args_EQ : Joined<["-"], "fextend-arguments=">, Group<f_Group>,
  1528. Flags<[CC1Option, NoArgumentUnused]>,
  1529. HelpText<"Controls how scalar integer arguments are extended in calls "
  1530. "to unprototyped and varargs functions">,
  1531. Values<"32,64">,
  1532. NormalizedValues<["ExtendTo32", "ExtendTo64"]>,
  1533. NormalizedValuesScope<"LangOptions::ExtendArgsKind">,
  1534. MarshallingInfoEnum<LangOpts<"ExtendIntArgs">,"ExtendTo32">;
  1535. def fbracket_depth_EQ : Joined<["-"], "fbracket-depth=">, Group<f_Group>, Flags<[CoreOption]>;
  1536. def fsignaling_math : Flag<["-"], "fsignaling-math">, Group<f_Group>;
  1537. def fno_signaling_math : Flag<["-"], "fno-signaling-math">, Group<f_Group>;
  1538. defm jump_tables : BoolFOption<"jump-tables",
  1539. CodeGenOpts<"NoUseJumpTables">, DefaultFalse,
  1540. NegFlag<SetTrue, [CC1Option], "Do not use">, PosFlag<SetFalse, [], "Use">,
  1541. BothFlags<[], " jump tables for lowering switches">>;
  1542. defm force_enable_int128 : BoolFOption<"force-enable-int128",
  1543. TargetOpts<"ForceEnableInt128">, DefaultFalse,
  1544. PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
  1545. BothFlags<[], " support for int128_t type">>;
  1546. defm keep_static_consts : BoolFOption<"keep-static-consts",
  1547. CodeGenOpts<"KeepStaticConsts">, DefaultFalse,
  1548. PosFlag<SetTrue, [CC1Option], "Keep">, NegFlag<SetFalse, [], "Don't keep">,
  1549. BothFlags<[NoXarchOption], " static const variables if unused">>;
  1550. defm fixed_point : BoolFOption<"fixed-point",
  1551. LangOpts<"FixedPoint">, DefaultFalse,
  1552. PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
  1553. BothFlags<[], " fixed point types">>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>;
  1554. defm cxx_static_destructors : BoolFOption<"c++-static-destructors",
  1555. LangOpts<"RegisterStaticDestructors">, DefaultTrue,
  1556. NegFlag<SetFalse, [CC1Option], "Disable C++ static destructor registration">,
  1557. PosFlag<SetTrue>>;
  1558. def fsymbol_partition_EQ : Joined<["-"], "fsymbol-partition=">, Group<f_Group>,
  1559. Flags<[CC1Option]>, MarshallingInfoString<CodeGenOpts<"SymbolPartition">>;
  1560. defm memory_profile : OptInCC1FFlag<"memory-profile", "Enable", "Disable", " heap memory profiling">;
  1561. def fmemory_profile_EQ : Joined<["-"], "fmemory-profile=">,
  1562. Group<f_Group>, Flags<[CC1Option]>, MetaVarName<"<directory>">,
  1563. HelpText<"Enable heap memory profiling and dump results into <directory>">;
  1564. // Begin sanitizer flags. These should all be core options exposed in all driver
  1565. // modes.
  1566. let Flags = [CC1Option, CoreOption] in {
  1567. def fsanitize_EQ : CommaJoined<["-"], "fsanitize=">, Group<f_clang_Group>,
  1568. MetaVarName<"<check>">,
  1569. HelpText<"Turn on runtime checks for various forms of undefined "
  1570. "or suspicious behavior. See user manual for available checks">;
  1571. def fno_sanitize_EQ : CommaJoined<["-"], "fno-sanitize=">, Group<f_clang_Group>,
  1572. Flags<[CoreOption, NoXarchOption]>;
  1573. def fsanitize_ignorelist_EQ : Joined<["-"], "fsanitize-ignorelist=">,
  1574. Group<f_clang_Group>, HelpText<"Path to ignorelist file for sanitizers">;
  1575. def : Joined<["-"], "fsanitize-blacklist=">,
  1576. Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fsanitize_ignorelist_EQ>,
  1577. HelpText<"Alias for -fsanitize-ignorelist=">;
  1578. def fsanitize_system_ignorelist_EQ : Joined<["-"], "fsanitize-system-ignorelist=">,
  1579. HelpText<"Path to system ignorelist file for sanitizers">, Flags<[CC1Option]>;
  1580. def : Joined<["-"], "fsanitize-system-blacklist=">,
  1581. HelpText<"Alias for -fsanitize-system-ignorelist=">,
  1582. Flags<[CC1Option, HelpHidden]>, Alias<fsanitize_system_ignorelist_EQ>;
  1583. def fno_sanitize_ignorelist : Flag<["-"], "fno-sanitize-ignorelist">,
  1584. Group<f_clang_Group>, HelpText<"Don't use ignorelist file for sanitizers">;
  1585. def : Flag<["-"], "fno-sanitize-blacklist">,
  1586. Group<f_clang_Group>, Flags<[HelpHidden]>, Alias<fno_sanitize_ignorelist>;
  1587. def fsanitize_coverage : CommaJoined<["-"], "fsanitize-coverage=">,
  1588. Group<f_clang_Group>,
  1589. HelpText<"Specify the type of coverage instrumentation for Sanitizers">;
  1590. def fno_sanitize_coverage : CommaJoined<["-"], "fno-sanitize-coverage=">,
  1591. Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
  1592. HelpText<"Disable features of coverage instrumentation for Sanitizers">,
  1593. Values<"func,bb,edge,indirect-calls,trace-bb,trace-cmp,trace-div,trace-gep,"
  1594. "8bit-counters,trace-pc,trace-pc-guard,no-prune,inline-8bit-counters,"
  1595. "inline-bool-flag">;
  1596. def fsanitize_coverage_allowlist : Joined<["-"], "fsanitize-coverage-allowlist=">,
  1597. Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
  1598. HelpText<"Restrict sanitizer coverage instrumentation exclusively to modules and functions that match the provided special case list, except the blocked ones">,
  1599. MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageAllowlistFiles">>;
  1600. def fsanitize_coverage_ignorelist : Joined<["-"], "fsanitize-coverage-ignorelist=">,
  1601. Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
  1602. HelpText<"Disable sanitizer coverage instrumentation for modules and functions "
  1603. "that match the provided special case list, even the allowed ones">,
  1604. MarshallingInfoStringVector<CodeGenOpts<"SanitizeCoverageIgnorelistFiles">>;
  1605. def fexperimental_sanitize_metadata_EQ : CommaJoined<["-"], "fexperimental-sanitize-metadata=">,
  1606. Group<f_Group>,
  1607. HelpText<"Specify the type of metadata to emit for binary analysis sanitizers">;
  1608. def fno_experimental_sanitize_metadata_EQ : CommaJoined<["-"], "fno-experimental-sanitize-metadata=">,
  1609. Group<f_Group>, Flags<[CoreOption]>,
  1610. HelpText<"Disable emitting metadata for binary analysis sanitizers">;
  1611. def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">,
  1612. Group<f_clang_Group>,
  1613. HelpText<"Enable origins tracking in MemorySanitizer">,
  1614. MarshallingInfoInt<CodeGenOpts<"SanitizeMemoryTrackOrigins">>;
  1615. def fsanitize_memory_track_origins : Flag<["-"], "fsanitize-memory-track-origins">,
  1616. Group<f_clang_Group>,
  1617. Alias<fsanitize_memory_track_origins_EQ>, AliasArgs<["2"]>,
  1618. HelpText<"Enable origins tracking in MemorySanitizer">;
  1619. def fno_sanitize_memory_track_origins : Flag<["-"], "fno-sanitize-memory-track-origins">,
  1620. Group<f_clang_Group>,
  1621. Flags<[CoreOption, NoXarchOption]>,
  1622. HelpText<"Disable origins tracking in MemorySanitizer">;
  1623. def fsanitize_address_outline_instrumentation : Flag<["-"], "fsanitize-address-outline-instrumentation">,
  1624. Group<f_clang_Group>,
  1625. HelpText<"Always generate function calls for address sanitizer instrumentation">;
  1626. def fno_sanitize_address_outline_instrumentation : Flag<["-"], "fno-sanitize-address-outline-instrumentation">,
  1627. Group<f_clang_Group>,
  1628. HelpText<"Use default code inlining logic for the address sanitizer">;
  1629. def fsanitize_memtag_mode_EQ : Joined<["-"], "fsanitize-memtag-mode=">,
  1630. Group<f_clang_Group>,
  1631. HelpText<"Set default MTE mode to 'sync' (default) or 'async'">;
  1632. def fsanitize_hwaddress_experimental_aliasing
  1633. : Flag<["-"], "fsanitize-hwaddress-experimental-aliasing">,
  1634. Group<f_clang_Group>,
  1635. HelpText<"Enable aliasing mode in HWAddressSanitizer">;
  1636. def fno_sanitize_hwaddress_experimental_aliasing
  1637. : Flag<["-"], "fno-sanitize-hwaddress-experimental-aliasing">,
  1638. Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
  1639. HelpText<"Disable aliasing mode in HWAddressSanitizer">;
  1640. defm sanitize_memory_use_after_dtor : BoolOption<"f", "sanitize-memory-use-after-dtor",
  1641. CodeGenOpts<"SanitizeMemoryUseAfterDtor">, DefaultFalse,
  1642. PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
  1643. BothFlags<[], " use-after-destroy detection in MemorySanitizer">>,
  1644. Group<f_clang_Group>;
  1645. def fsanitize_address_field_padding : Joined<["-"], "fsanitize-address-field-padding=">,
  1646. Group<f_clang_Group>,
  1647. HelpText<"Level of field padding for AddressSanitizer">,
  1648. MarshallingInfoInt<LangOpts<"SanitizeAddressFieldPadding">>;
  1649. defm sanitize_address_use_after_scope : BoolOption<"f", "sanitize-address-use-after-scope",
  1650. CodeGenOpts<"SanitizeAddressUseAfterScope">, DefaultFalse,
  1651. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
  1652. BothFlags<[], " use-after-scope detection in AddressSanitizer">>,
  1653. Group<f_clang_Group>;
  1654. def sanitize_address_use_after_return_EQ
  1655. : Joined<["-"], "fsanitize-address-use-after-return=">,
  1656. MetaVarName<"<mode>">,
  1657. Flags<[CC1Option]>,
  1658. HelpText<"Select the mode of detecting stack use-after-return in AddressSanitizer">,
  1659. Group<f_clang_Group>,
  1660. Values<"never,runtime,always">,
  1661. NormalizedValuesScope<"llvm::AsanDetectStackUseAfterReturnMode">,
  1662. NormalizedValues<["Never", "Runtime", "Always"]>,
  1663. MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressUseAfterReturn">, "Runtime">;
  1664. defm sanitize_address_poison_custom_array_cookie : BoolOption<"f", "sanitize-address-poison-custom-array-cookie",
  1665. CodeGenOpts<"SanitizeAddressPoisonCustomArrayCookie">, DefaultFalse,
  1666. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
  1667. BothFlags<[], " poisoning array cookies when using custom operator new[] in AddressSanitizer">>,
  1668. Group<f_clang_Group>;
  1669. defm sanitize_address_globals_dead_stripping : BoolOption<"f", "sanitize-address-globals-dead-stripping",
  1670. CodeGenOpts<"SanitizeAddressGlobalsDeadStripping">, DefaultFalse,
  1671. PosFlag<SetTrue, [], "Enable linker dead stripping of globals in AddressSanitizer">,
  1672. NegFlag<SetFalse, [], "Disable linker dead stripping of globals in AddressSanitizer">>,
  1673. Group<f_clang_Group>;
  1674. defm sanitize_address_use_odr_indicator : BoolOption<"f", "sanitize-address-use-odr-indicator",
  1675. CodeGenOpts<"SanitizeAddressUseOdrIndicator">, DefaultTrue,
  1676. PosFlag<SetTrue, [], "Enable ODR indicator globals to avoid false ODR violation"
  1677. " reports in partially sanitized programs at the cost of an increase in binary size">,
  1678. NegFlag<SetFalse, [], "Disable ODR indicator globals">>,
  1679. Group<f_clang_Group>;
  1680. def sanitize_address_destructor_EQ
  1681. : Joined<["-"], "fsanitize-address-destructor=">,
  1682. Flags<[CC1Option]>,
  1683. HelpText<"Set destructor type used in ASan instrumentation">,
  1684. Group<f_clang_Group>,
  1685. Values<"none,global">,
  1686. NormalizedValuesScope<"llvm::AsanDtorKind">,
  1687. NormalizedValues<["None", "Global"]>,
  1688. MarshallingInfoEnum<CodeGenOpts<"SanitizeAddressDtor">, "Global">;
  1689. defm sanitize_memory_param_retval
  1690. : BoolFOption<"sanitize-memory-param-retval",
  1691. CodeGenOpts<"SanitizeMemoryParamRetval">,
  1692. DefaultTrue,
  1693. PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
  1694. BothFlags<[], " detection of uninitialized parameters and return values">>;
  1695. //// Note: This flag was introduced when it was necessary to distinguish between
  1696. // ABI for correct codegen. This is no longer needed, but the flag is
  1697. // not removed since targeting either ABI will behave the same.
  1698. // This way we cause no disturbance to existing scripts & code, and if we
  1699. // want to use this flag in the future we will cause no disturbance then
  1700. // either.
  1701. def fsanitize_hwaddress_abi_EQ
  1702. : Joined<["-"], "fsanitize-hwaddress-abi=">,
  1703. Group<f_clang_Group>,
  1704. HelpText<"Select the HWAddressSanitizer ABI to target (interceptor or platform, default interceptor). This option is currently unused.">;
  1705. def fsanitize_recover_EQ : CommaJoined<["-"], "fsanitize-recover=">,
  1706. Group<f_clang_Group>,
  1707. HelpText<"Enable recovery for specified sanitizers">;
  1708. def fno_sanitize_recover_EQ : CommaJoined<["-"], "fno-sanitize-recover=">,
  1709. Group<f_clang_Group>, Flags<[CoreOption, NoXarchOption]>,
  1710. HelpText<"Disable recovery for specified sanitizers">;
  1711. def fsanitize_recover : Flag<["-"], "fsanitize-recover">, Group<f_clang_Group>,
  1712. Alias<fsanitize_recover_EQ>, AliasArgs<["all"]>;
  1713. def fno_sanitize_recover : Flag<["-"], "fno-sanitize-recover">,
  1714. Flags<[CoreOption, NoXarchOption]>, Group<f_clang_Group>,
  1715. Alias<fno_sanitize_recover_EQ>, AliasArgs<["all"]>;
  1716. def fsanitize_trap_EQ : CommaJoined<["-"], "fsanitize-trap=">, Group<f_clang_Group>,
  1717. HelpText<"Enable trapping for specified sanitizers">;
  1718. def fno_sanitize_trap_EQ : CommaJoined<["-"], "fno-sanitize-trap=">, Group<f_clang_Group>,
  1719. Flags<[CoreOption, NoXarchOption]>,
  1720. HelpText<"Disable trapping for specified sanitizers">;
  1721. def fsanitize_trap : Flag<["-"], "fsanitize-trap">, Group<f_clang_Group>,
  1722. Alias<fsanitize_trap_EQ>, AliasArgs<["all"]>,
  1723. HelpText<"Enable trapping for all sanitizers">;
  1724. def fno_sanitize_trap : Flag<["-"], "fno-sanitize-trap">, Group<f_clang_Group>,
  1725. Alias<fno_sanitize_trap_EQ>, AliasArgs<["all"]>,
  1726. Flags<[CoreOption, NoXarchOption]>,
  1727. HelpText<"Disable trapping for all sanitizers">;
  1728. def fsanitize_undefined_trap_on_error
  1729. : Flag<["-"], "fsanitize-undefined-trap-on-error">, Group<f_clang_Group>,
  1730. Alias<fsanitize_trap_EQ>, AliasArgs<["undefined"]>;
  1731. def fno_sanitize_undefined_trap_on_error
  1732. : Flag<["-"], "fno-sanitize-undefined-trap-on-error">, Group<f_clang_Group>,
  1733. Alias<fno_sanitize_trap_EQ>, AliasArgs<["undefined"]>;
  1734. defm sanitize_minimal_runtime : BoolOption<"f", "sanitize-minimal-runtime",
  1735. CodeGenOpts<"SanitizeMinimalRuntime">, DefaultFalse,
  1736. PosFlag<SetTrue>, NegFlag<SetFalse>>,
  1737. Group<f_clang_Group>;
  1738. def fsanitize_link_runtime : Flag<["-"], "fsanitize-link-runtime">,
  1739. Group<f_clang_Group>;
  1740. def fno_sanitize_link_runtime : Flag<["-"], "fno-sanitize-link-runtime">,
  1741. Group<f_clang_Group>;
  1742. def fsanitize_link_cxx_runtime : Flag<["-"], "fsanitize-link-c++-runtime">,
  1743. Group<f_clang_Group>;
  1744. def fno_sanitize_link_cxx_runtime : Flag<["-"], "fno-sanitize-link-c++-runtime">,
  1745. Group<f_clang_Group>;
  1746. defm sanitize_cfi_cross_dso : BoolOption<"f", "sanitize-cfi-cross-dso",
  1747. CodeGenOpts<"SanitizeCfiCrossDso">, DefaultFalse,
  1748. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
  1749. BothFlags<[], " control flow integrity (CFI) checks for cross-DSO calls.">>,
  1750. Group<f_clang_Group>;
  1751. def fsanitize_cfi_icall_generalize_pointers : Flag<["-"], "fsanitize-cfi-icall-generalize-pointers">,
  1752. Group<f_clang_Group>,
  1753. HelpText<"Generalize pointers in CFI indirect call type signature checks">,
  1754. MarshallingInfoFlag<CodeGenOpts<"SanitizeCfiICallGeneralizePointers">>;
  1755. defm sanitize_cfi_canonical_jump_tables : BoolOption<"f", "sanitize-cfi-canonical-jump-tables",
  1756. CodeGenOpts<"SanitizeCfiCanonicalJumpTables">, DefaultFalse,
  1757. PosFlag<SetTrue, [], "Make">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Do not make">,
  1758. BothFlags<[], " the jump table addresses canonical in the symbol table">>,
  1759. Group<f_clang_Group>;
  1760. defm sanitize_stats : BoolOption<"f", "sanitize-stats",
  1761. CodeGenOpts<"SanitizeStats">, DefaultFalse,
  1762. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [CoreOption, NoXarchOption], "Disable">,
  1763. BothFlags<[], " sanitizer statistics gathering.">>,
  1764. Group<f_clang_Group>;
  1765. def fsanitize_thread_memory_access : Flag<["-"], "fsanitize-thread-memory-access">,
  1766. Group<f_clang_Group>,
  1767. HelpText<"Enable memory access instrumentation in ThreadSanitizer (default)">;
  1768. def fno_sanitize_thread_memory_access : Flag<["-"], "fno-sanitize-thread-memory-access">,
  1769. Group<f_clang_Group>,
  1770. Flags<[CoreOption, NoXarchOption]>,
  1771. HelpText<"Disable memory access instrumentation in ThreadSanitizer">;
  1772. def fsanitize_thread_func_entry_exit : Flag<["-"], "fsanitize-thread-func-entry-exit">,
  1773. Group<f_clang_Group>,
  1774. HelpText<"Enable function entry/exit instrumentation in ThreadSanitizer (default)">;
  1775. def fno_sanitize_thread_func_entry_exit : Flag<["-"], "fno-sanitize-thread-func-entry-exit">,
  1776. Group<f_clang_Group>,
  1777. Flags<[CoreOption, NoXarchOption]>,
  1778. HelpText<"Disable function entry/exit instrumentation in ThreadSanitizer">;
  1779. def fsanitize_thread_atomics : Flag<["-"], "fsanitize-thread-atomics">,
  1780. Group<f_clang_Group>,
  1781. HelpText<"Enable atomic operations instrumentation in ThreadSanitizer (default)">;
  1782. def fno_sanitize_thread_atomics : Flag<["-"], "fno-sanitize-thread-atomics">,
  1783. Group<f_clang_Group>,
  1784. Flags<[CoreOption, NoXarchOption]>,
  1785. HelpText<"Disable atomic operations instrumentation in ThreadSanitizer">;
  1786. def fsanitize_undefined_strip_path_components_EQ : Joined<["-"], "fsanitize-undefined-strip-path-components=">,
  1787. Group<f_clang_Group>, MetaVarName<"<number>">,
  1788. HelpText<"Strip (or keep only, if negative) a given number of path components "
  1789. "when emitting check metadata.">,
  1790. MarshallingInfoInt<CodeGenOpts<"EmitCheckPathComponentsToStrip">, "0", "int">;
  1791. } // end -f[no-]sanitize* flags
  1792. def funsafe_math_optimizations : Flag<["-"], "funsafe-math-optimizations">,
  1793. Group<f_Group>, Flags<[CC1Option]>,
  1794. HelpText<"Allow unsafe floating-point math optimizations which may decrease precision">,
  1795. MarshallingInfoFlag<LangOpts<"UnsafeFPMath">>,
  1796. ImpliedByAnyOf<[cl_unsafe_math_optimizations.KeyPath, ffast_math.KeyPath]>;
  1797. def fno_unsafe_math_optimizations : Flag<["-"], "fno-unsafe-math-optimizations">,
  1798. Group<f_Group>;
  1799. def fassociative_math : Flag<["-"], "fassociative-math">, Group<f_Group>;
  1800. def fno_associative_math : Flag<["-"], "fno-associative-math">, Group<f_Group>;
  1801. defm reciprocal_math : BoolFOption<"reciprocal-math",
  1802. LangOpts<"AllowRecip">, DefaultFalse,
  1803. PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow division operations to be reassociated",
  1804. [funsafe_math_optimizations.KeyPath]>,
  1805. NegFlag<SetFalse>>;
  1806. defm approx_func : BoolFOption<"approx-func", LangOpts<"ApproxFunc">, DefaultFalse,
  1807. PosFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow certain math function calls to be replaced "
  1808. "with an approximately equivalent calculation",
  1809. [funsafe_math_optimizations.KeyPath]>,
  1810. NegFlag<SetFalse>>;
  1811. defm finite_math_only : BoolFOption<"finite-math-only",
  1812. LangOpts<"FiniteMathOnly">, DefaultFalse,
  1813. PosFlag<SetTrue, [CC1Option], "", [cl_finite_math_only.KeyPath, ffast_math.KeyPath]>,
  1814. NegFlag<SetFalse>>;
  1815. defm signed_zeros : BoolFOption<"signed-zeros",
  1816. LangOpts<"NoSignedZero">, DefaultFalse,
  1817. NegFlag<SetTrue, [CC1Option, FC1Option, FlangOption], "Allow optimizations that ignore the sign of floating point zeros",
  1818. [cl_no_signed_zeros.KeyPath, funsafe_math_optimizations.KeyPath]>,
  1819. PosFlag<SetFalse>>;
  1820. def fhonor_nans : Flag<["-"], "fhonor-nans">, Group<f_Group>;
  1821. def fno_honor_nans : Flag<["-"], "fno-honor-nans">, Group<f_Group>;
  1822. def fhonor_infinities : Flag<["-"], "fhonor-infinities">, Group<f_Group>;
  1823. def fno_honor_infinities : Flag<["-"], "fno-honor-infinities">, Group<f_Group>;
  1824. // This option was originally misspelt "infinites" [sic].
  1825. def : Flag<["-"], "fhonor-infinites">, Alias<fhonor_infinities>;
  1826. def : Flag<["-"], "fno-honor-infinites">, Alias<fno_honor_infinities>;
  1827. def frounding_math : Flag<["-"], "frounding-math">, Group<f_Group>, Flags<[CC1Option]>,
  1828. MarshallingInfoFlag<LangOpts<"RoundingMath">>,
  1829. Normalizer<"makeFlagToValueNormalizer(llvm::RoundingMode::Dynamic)">;
  1830. def fno_rounding_math : Flag<["-"], "fno-rounding-math">, Group<f_Group>, Flags<[CC1Option]>;
  1831. def ftrapping_math : Flag<["-"], "ftrapping-math">, Group<f_Group>;
  1832. def fno_trapping_math : Flag<["-"], "fno-trapping-math">, Group<f_Group>;
  1833. def ffp_contract : Joined<["-"], "ffp-contract=">, Group<f_Group>,
  1834. Flags<[CC1Option, FC1Option, FlangOption]>,
  1835. DocBrief<"Form fused FP ops (e.g. FMAs):"
  1836. " fast (fuses across statements disregarding pragmas)"
  1837. " | on (only fuses in the same statement unless dictated by pragmas)"
  1838. " | off (never fuses)"
  1839. " | fast-honor-pragmas (fuses across statements unless dictated by pragmas)."
  1840. " Default is 'fast' for CUDA, 'fast-honor-pragmas' for HIP, and 'on' otherwise.">,
  1841. HelpText<"Form fused FP ops (e.g. FMAs)">,
  1842. Values<"fast,on,off,fast-honor-pragmas">;
  1843. defm strict_float_cast_overflow : BoolFOption<"strict-float-cast-overflow",
  1844. CodeGenOpts<"StrictFloatCastOverflow">, DefaultTrue,
  1845. NegFlag<SetFalse, [CC1Option], "Relax language rules and try to match the behavior"
  1846. " of the target's native float-to-int conversion instructions">,
  1847. PosFlag<SetTrue, [], "Assume that overflowing float-to-int casts are undefined (default)">>;
  1848. defm protect_parens : BoolFOption<"protect-parens",
  1849. LangOpts<"ProtectParens">, DefaultFalse,
  1850. PosFlag<SetTrue, [CoreOption, CC1Option],
  1851. "Determines whether the optimizer honors parentheses when "
  1852. "floating-point expressions are evaluated">,
  1853. NegFlag<SetFalse>>;
  1854. def ffor_scope : Flag<["-"], "ffor-scope">, Group<f_Group>;
  1855. def fno_for_scope : Flag<["-"], "fno-for-scope">, Group<f_Group>;
  1856. defm rewrite_imports : BoolFOption<"rewrite-imports",
  1857. PreprocessorOutputOpts<"RewriteImports">, DefaultFalse,
  1858. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
  1859. defm rewrite_includes : BoolFOption<"rewrite-includes",
  1860. PreprocessorOutputOpts<"RewriteIncludes">, DefaultFalse,
  1861. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
  1862. defm directives_only : OptInCC1FFlag<"directives-only", "">;
  1863. defm delete_null_pointer_checks : BoolFOption<"delete-null-pointer-checks",
  1864. CodeGenOpts<"NullPointerIsValid">, DefaultFalse,
  1865. NegFlag<SetTrue, [CC1Option], "Do not treat usage of null pointers as undefined behavior">,
  1866. PosFlag<SetFalse, [], "Treat usage of null pointers as undefined behavior (default)">,
  1867. BothFlags<[CoreOption]>>;
  1868. def frewrite_map_file_EQ : Joined<["-"], "frewrite-map-file=">,
  1869. Group<f_Group>,
  1870. Flags<[NoXarchOption, CC1Option]>,
  1871. MarshallingInfoStringVector<CodeGenOpts<"RewriteMapFiles">>;
  1872. defm use_line_directives : BoolFOption<"use-line-directives",
  1873. PreprocessorOutputOpts<"UseLineDirectives">, DefaultFalse,
  1874. PosFlag<SetTrue, [CC1Option], "Use #line in preprocessed output">, NegFlag<SetFalse>>;
  1875. defm minimize_whitespace : BoolFOption<"minimize-whitespace",
  1876. PreprocessorOutputOpts<"MinimizeWhitespace">, DefaultFalse,
  1877. PosFlag<SetTrue, [CC1Option], "Minimize whitespace when emitting preprocessor output">, NegFlag<SetFalse>>;
  1878. def ffreestanding : Flag<["-"], "ffreestanding">, Group<f_Group>, Flags<[CC1Option]>,
  1879. HelpText<"Assert that the compilation takes place in a freestanding environment">,
  1880. MarshallingInfoFlag<LangOpts<"Freestanding">>;
  1881. def fgnuc_version_EQ : Joined<["-"], "fgnuc-version=">, Group<f_Group>,
  1882. HelpText<"Sets various macros to claim compatibility with the given GCC version (default is 4.2.1)">,
  1883. Flags<[CC1Option, CoreOption]>;
  1884. // We abuse '-f[no-]gnu-keywords' to force overriding all GNU-extension
  1885. // keywords. This behavior is provided by GCC's poorly named '-fasm' flag,
  1886. // while a subset (the non-C++ GNU keywords) is provided by GCC's
  1887. // '-fgnu-keywords'. Clang conflates the two for simplicity under the single
  1888. // name, as it doesn't seem a useful distinction.
  1889. defm gnu_keywords : BoolFOption<"gnu-keywords",
  1890. LangOpts<"GNUKeywords">, Default<gnu_mode.KeyPath>,
  1891. PosFlag<SetTrue, [], "Allow GNU-extension keywords regardless of language standard">,
  1892. NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
  1893. defm gnu89_inline : BoolFOption<"gnu89-inline",
  1894. LangOpts<"GNUInline">, Default<!strconcat("!", c99.KeyPath, " && !", cplusplus.KeyPath)>,
  1895. PosFlag<SetTrue, [CC1Option], "Use the gnu89 inline semantics">,
  1896. NegFlag<SetFalse>>, ShouldParseIf<!strconcat("!", cplusplus.KeyPath)>;
  1897. def fgnu_runtime : Flag<["-"], "fgnu-runtime">, Group<f_Group>,
  1898. HelpText<"Generate output compatible with the standard GNU Objective-C runtime">;
  1899. def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>,
  1900. MarshallingInfoFlag<LangOpts<"HeinousExtensions">>;
  1901. def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>,
  1902. Group<Link_Group>;
  1903. def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>;
  1904. def finline_functions : Flag<["-"], "finline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
  1905. HelpText<"Inline suitable functions">;
  1906. def finline_hint_functions: Flag<["-"], "finline-hint-functions">, Group<f_clang_Group>, Flags<[CC1Option]>,
  1907. HelpText<"Inline functions which are (explicitly or implicitly) marked inline">;
  1908. def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>;
  1909. def finline_max_stacksize_EQ
  1910. : Joined<["-"], "finline-max-stacksize=">,
  1911. Group<f_Group>, Flags<[CoreOption, CC1Option]>,
  1912. HelpText<"Suppress inlining of functions whose stack size exceeds the given value">,
  1913. MarshallingInfoInt<CodeGenOpts<"InlineMaxStackSize">, "UINT_MAX">;
  1914. defm jmc : BoolFOption<"jmc",
  1915. CodeGenOpts<"JMCInstrument">, DefaultFalse,
  1916. PosFlag<SetTrue, [CC1Option], "Enable just-my-code debugging">,
  1917. NegFlag<SetFalse>>;
  1918. def fglobal_isel : Flag<["-"], "fglobal-isel">, Group<f_clang_Group>,
  1919. HelpText<"Enables the global instruction selector">;
  1920. def fexperimental_isel : Flag<["-"], "fexperimental-isel">, Group<f_clang_Group>,
  1921. Alias<fglobal_isel>;
  1922. def fexperimental_strict_floating_point : Flag<["-"], "fexperimental-strict-floating-point">,
  1923. Group<f_clang_Group>, Flags<[CC1Option]>,
  1924. HelpText<"Enables experimental strict floating point in LLVM.">,
  1925. MarshallingInfoFlag<LangOpts<"ExpStrictFP">>;
  1926. def finput_charset_EQ : Joined<["-"], "finput-charset=">, Flags<[FlangOption, FC1Option]>, Group<f_Group>,
  1927. HelpText<"Specify the default character set for source files">;
  1928. def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>;
  1929. def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>,
  1930. HelpText<"Generate calls to instrument function entry and exit">,
  1931. MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctions">>;
  1932. def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, Flags<[CC1Option]>,
  1933. HelpText<"Like -finstrument-functions, but insert the calls after inlining">,
  1934. MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionsAfterInlining">>;
  1935. def finstrument_function_entry_bare : Flag<["-"], "finstrument-function-entry-bare">, Group<f_Group>, Flags<[CC1Option]>,
  1936. HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">,
  1937. MarshallingInfoFlag<CodeGenOpts<"InstrumentFunctionEntryBare">>;
  1938. def fcf_protection_EQ : Joined<["-"], "fcf-protection=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
  1939. HelpText<"Instrument control-flow architecture protection">, Values<"return,branch,full,none">;
  1940. def fcf_protection : Flag<["-"], "fcf-protection">, Group<f_Group>, Flags<[CoreOption, CC1Option]>,
  1941. Alias<fcf_protection_EQ>, AliasArgs<["full"]>,
  1942. HelpText<"Enable cf-protection in 'full' mode">;
  1943. def mfunction_return_EQ : Joined<["-"], "mfunction-return=">,
  1944. Group<m_Group>, Flags<[CoreOption, CC1Option]>,
  1945. HelpText<"Replace returns with jumps to ``__x86_return_thunk`` (x86 only, error otherwise)">,
  1946. Values<"keep,thunk-extern">,
  1947. NormalizedValues<["Keep", "Extern"]>,
  1948. NormalizedValuesScope<"llvm::FunctionReturnThunksKind">,
  1949. MarshallingInfoEnum<CodeGenOpts<"FunctionReturnThunks">, "Keep">;
  1950. def mindirect_branch_cs_prefix : Flag<["-"], "mindirect-branch-cs-prefix">,
  1951. Group<m_Group>, Flags<[CoreOption, CC1Option]>,
  1952. HelpText<"Add cs prefix to call and jmp to indirect thunk">,
  1953. MarshallingInfoFlag<CodeGenOpts<"IndirectBranchCSPrefix">>;
  1954. defm xray_instrument : BoolFOption<"xray-instrument",
  1955. LangOpts<"XRayInstrument">, DefaultFalse,
  1956. PosFlag<SetTrue, [CC1Option], "Generate XRay instrumentation sleds on function entry and exit">,
  1957. NegFlag<SetFalse>>;
  1958. def fxray_instruction_threshold_EQ :
  1959. Joined<["-"], "fxray-instruction-threshold=">,
  1960. Group<f_Group>, Flags<[CC1Option]>,
  1961. HelpText<"Sets the minimum function size to instrument with XRay">,
  1962. MarshallingInfoInt<CodeGenOpts<"XRayInstructionThreshold">, "200">;
  1963. def fxray_always_instrument :
  1964. Joined<["-"], "fxray-always-instrument=">,
  1965. Group<f_Group>, Flags<[CC1Option]>,
  1966. HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'always instrument' XRay attribute.">,
  1967. MarshallingInfoStringVector<LangOpts<"XRayAlwaysInstrumentFiles">>;
  1968. def fxray_never_instrument :
  1969. Joined<["-"], "fxray-never-instrument=">,
  1970. Group<f_Group>, Flags<[CC1Option]>,
  1971. HelpText<"DEPRECATED: Filename defining the whitelist for imbuing the 'never instrument' XRay attribute.">,
  1972. MarshallingInfoStringVector<LangOpts<"XRayNeverInstrumentFiles">>;
  1973. def fxray_attr_list :
  1974. Joined<["-"], "fxray-attr-list=">,
  1975. Group<f_Group>, Flags<[CC1Option]>,
  1976. HelpText<"Filename defining the list of functions/types for imbuing XRay attributes.">,
  1977. MarshallingInfoStringVector<LangOpts<"XRayAttrListFiles">>;
  1978. def fxray_modes :
  1979. Joined<["-"], "fxray-modes=">,
  1980. Group<f_Group>, Flags<[CC1Option]>,
  1981. HelpText<"List of modes to link in by default into XRay instrumented binaries.">;
  1982. defm xray_always_emit_customevents : BoolFOption<"xray-always-emit-customevents",
  1983. LangOpts<"XRayAlwaysEmitCustomEvents">, DefaultFalse,
  1984. PosFlag<SetTrue, [CC1Option], "Always emit __xray_customevent(...) calls"
  1985. " even if the containing function is not always instrumented">,
  1986. NegFlag<SetFalse>>;
  1987. defm xray_always_emit_typedevents : BoolFOption<"xray-always-emit-typedevents",
  1988. LangOpts<"XRayAlwaysEmitTypedEvents">, DefaultFalse,
  1989. PosFlag<SetTrue, [CC1Option], "Always emit __xray_typedevent(...) calls"
  1990. " even if the containing function is not always instrumented">,
  1991. NegFlag<SetFalse>>;
  1992. defm xray_ignore_loops : BoolFOption<"xray-ignore-loops",
  1993. CodeGenOpts<"XRayIgnoreLoops">, DefaultFalse,
  1994. PosFlag<SetTrue, [CC1Option], "Don't instrument functions with loops"
  1995. " unless they also meet the minimum function size">,
  1996. NegFlag<SetFalse>>;
  1997. defm xray_function_index : BoolFOption<"xray-function-index",
  1998. CodeGenOpts<"XRayOmitFunctionIndex">, DefaultTrue,
  1999. NegFlag<SetFalse, [CC1Option], "Omit function index section at the"
  2000. " expense of single-function patching performance">,
  2001. PosFlag<SetTrue>>;
  2002. def fxray_link_deps : Flag<["-"], "fxray-link-deps">, Group<f_Group>,
  2003. Flags<[CC1Option]>,
  2004. HelpText<"Tells clang to add the link dependencies for XRay.">;
  2005. def fnoxray_link_deps : Flag<["-"], "fnoxray-link-deps">, Group<f_Group>,
  2006. Flags<[CC1Option]>;
  2007. def fxray_instrumentation_bundle :
  2008. Joined<["-"], "fxray-instrumentation-bundle=">,
  2009. Group<f_Group>, Flags<[CC1Option]>,
  2010. HelpText<"Select which XRay instrumentation points to emit. Options: all, none, function-entry, function-exit, function, custom. Default is 'all'. 'function' includes both 'function-entry' and 'function-exit'.">;
  2011. def fxray_function_groups :
  2012. Joined<["-"], "fxray-function-groups=">,
  2013. Group<f_Group>, Flags<[CC1Option]>,
  2014. HelpText<"Only instrument 1 of N groups">,
  2015. MarshallingInfoInt<CodeGenOpts<"XRayTotalFunctionGroups">, "1">;
  2016. def fxray_selected_function_group :
  2017. Joined<["-"], "fxray-selected-function-group=">,
  2018. Group<f_Group>, Flags<[CC1Option]>,
  2019. HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">,
  2020. MarshallingInfoInt<CodeGenOpts<"XRaySelectedFunctionGroup">, "0">;
  2021. defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-accesses",
  2022. CodeGenOpts<"FineGrainedBitfieldAccesses">, DefaultFalse,
  2023. PosFlag<SetTrue, [], "Use separate accesses for consecutive bitfield runs with legal widths and alignments.">,
  2024. NegFlag<SetFalse, [], "Use large-integer access for consecutive bitfield runs.">,
  2025. BothFlags<[CC1Option]>>,
  2026. Group<f_clang_Group>;
  2027. def fexperimental_relative_cxx_abi_vtables :
  2028. Flag<["-"], "fexperimental-relative-c++-abi-vtables">,
  2029. Group<f_clang_Group>, Flags<[CC1Option]>,
  2030. HelpText<"Use the experimental C++ class ABI for classes with virtual tables">;
  2031. def fno_experimental_relative_cxx_abi_vtables :
  2032. Flag<["-"], "fno-experimental-relative-c++-abi-vtables">,
  2033. Group<f_clang_Group>, Flags<[CC1Option]>,
  2034. HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">;
  2035. def fcxx_abi_EQ : Joined<["-"], "fc++-abi=">,
  2036. Group<f_clang_Group>, Flags<[CC1Option]>,
  2037. HelpText<"C++ ABI to use. This will override the target C++ ABI.">;
  2038. def flat__namespace : Flag<["-"], "flat_namespace">;
  2039. def flax_vector_conversions_EQ : Joined<["-"], "flax-vector-conversions=">, Group<f_Group>,
  2040. HelpText<"Enable implicit vector bit-casts">, Values<"none,integer,all">, Flags<[CC1Option]>,
  2041. NormalizedValues<["LangOptions::LaxVectorConversionKind::None",
  2042. "LangOptions::LaxVectorConversionKind::Integer",
  2043. "LangOptions::LaxVectorConversionKind::All"]>,
  2044. MarshallingInfoEnum<LangOpts<"LaxVectorConversions">,
  2045. open_cl.KeyPath #
  2046. " ? LangOptions::LaxVectorConversionKind::None" #
  2047. " : LangOptions::LaxVectorConversionKind::All">;
  2048. def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>,
  2049. Alias<flax_vector_conversions_EQ>, AliasArgs<["integer"]>;
  2050. def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>;
  2051. def fapple_link_rtlib : Flag<["-"], "fapple-link-rtlib">, Group<f_Group>,
  2052. HelpText<"Force linking the clang builtins runtime library">;
  2053. def flto_EQ : Joined<["-"], "flto=">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
  2054. HelpText<"Set LTO mode">, Values<"thin,full">;
  2055. def flto_EQ_jobserver : Flag<["-"], "flto=jobserver">, Group<f_Group>,
  2056. Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">;
  2057. def flto_EQ_auto : Flag<["-"], "flto=auto">, Group<f_Group>,
  2058. Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">;
  2059. def flto : Flag<["-"], "flto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
  2060. Alias<flto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode">;
  2061. def fno_lto : Flag<["-"], "fno-lto">, Flags<[CoreOption, CC1Option]>, Group<f_Group>,
  2062. HelpText<"Disable LTO mode (default)">;
  2063. def foffload_lto_EQ : Joined<["-"], "foffload-lto=">, Flags<[CoreOption]>, Group<f_Group>,
  2064. HelpText<"Set LTO mode for offload compilation">, Values<"thin,full">;
  2065. def foffload_lto : Flag<["-"], "foffload-lto">, Flags<[CoreOption]>, Group<f_Group>,
  2066. Alias<foffload_lto_EQ>, AliasArgs<["full"]>, HelpText<"Enable LTO in 'full' mode for offload compilation">;
  2067. def fno_offload_lto : Flag<["-"], "fno-offload-lto">, Flags<[CoreOption]>, Group<f_Group>,
  2068. HelpText<"Disable LTO mode (default) for offload compilation">;
  2069. def flto_jobs_EQ : Joined<["-"], "flto-jobs=">,
  2070. Flags<[CC1Option]>, Group<f_Group>,
  2071. HelpText<"Controls the backend parallelism of -flto=thin (default "
  2072. "of 0 means the number of threads will be derived from "
  2073. "the number of CPUs detected)">;
  2074. def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">,
  2075. Flags<[CoreOption, CC1Option]>, Group<f_Group>,
  2076. HelpText<"Perform ThinLTO importing using provided function summary index">;
  2077. def fthin_link_bitcode_EQ : Joined<["-"], "fthin-link-bitcode=">,
  2078. Flags<[CoreOption, CC1Option]>, Group<f_Group>,
  2079. HelpText<"Write minimized bitcode to <file> for the ThinLTO thin link only">,
  2080. MarshallingInfoString<CodeGenOpts<"ThinLinkBitcodeFile">>;
  2081. def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
  2082. Group<f_Group>, Flags<[NoXarchOption, CoreOption]>;
  2083. defm merge_all_constants : BoolFOption<"merge-all-constants",
  2084. CodeGenOpts<"MergeAllConstants">, DefaultFalse,
  2085. PosFlag<SetTrue, [CC1Option, CoreOption], "Allow">, NegFlag<SetFalse, [], "Disallow">,
  2086. BothFlags<[], " merging of constants">>;
  2087. def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>, Flags<[CC1Option]>,
  2088. HelpText<"Format message diagnostics so that they fit within N columns">,
  2089. MarshallingInfoInt<DiagnosticOpts<"MessageLength">>;
  2090. def frandomize_layout_seed_EQ : Joined<["-"], "frandomize-layout-seed=">,
  2091. MetaVarName<"<seed>">, Group<f_clang_Group>, Flags<[CC1Option]>,
  2092. HelpText<"The seed used by the randomize structure layout feature">;
  2093. def frandomize_layout_seed_file_EQ : Joined<["-"], "frandomize-layout-seed-file=">,
  2094. MetaVarName<"<file>">, Group<f_clang_Group>, Flags<[CC1Option]>,
  2095. HelpText<"File holding the seed used by the randomize structure layout feature">;
  2096. def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  2097. HelpText<"Enable full Microsoft Visual C++ compatibility">,
  2098. MarshallingInfoFlag<LangOpts<"MSVCCompat">>;
  2099. def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  2100. HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">,
  2101. MarshallingInfoFlag<LangOpts<"MicrosoftExt">>, ImpliedByAnyOf<[fms_compatibility.KeyPath]>;
  2102. defm asm_blocks : BoolFOption<"asm-blocks",
  2103. LangOpts<"AsmBlocks">, Default<fms_extensions.KeyPath>,
  2104. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
  2105. def fms_volatile : Flag<["-"], "fms-volatile">, Group<f_Group>, Flags<[CC1Option]>,
  2106. MarshallingInfoFlag<LangOpts<"MSVolatile">>;
  2107. def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[NoXarchOption, CoreOption]>,
  2108. HelpText<"Microsoft compiler version number to report in _MSC_VER (0 = don't define it (default))">;
  2109. def fms_compatibility_version
  2110. : Joined<["-"], "fms-compatibility-version=">,
  2111. Group<f_Group>,
  2112. Flags<[ CC1Option, CoreOption ]>,
  2113. HelpText<"Dot-separated value representing the Microsoft compiler "
  2114. "version number to report in _MSC_VER (0 = don't define it "
  2115. "(default))">;
  2116. def fms_runtime_lib_EQ : Joined<["-"], "fms-runtime-lib=">, Group<f_Group>,
  2117. Flags<[NoXarchOption, CoreOption]>, Values<"static,static_dbg,dll,dll_dbg">,
  2118. HelpText<"Select Windows run-time library">,
  2119. DocBrief<[{
  2120. Specify Visual Studio C runtime library. "static" and "static_dbg" correspond
  2121. to the cl flags /MT and /MTd which use the multithread, static version. "dll"
  2122. and "dll_dbg" correspond to the cl flags /MD and /MDd which use the multithread,
  2123. dll version.}]>;
  2124. def fms_omit_default_lib : Joined<["-"], "fms-omit-default-lib">,
  2125. Group<f_Group>, Flags<[NoXarchOption, CoreOption]>;
  2126. defm delayed_template_parsing : BoolFOption<"delayed-template-parsing",
  2127. LangOpts<"DelayedTemplateParsing">, DefaultFalse,
  2128. PosFlag<SetTrue, [CC1Option], "Parse templated function definitions at the end of the translation unit">,
  2129. NegFlag<SetFalse, [NoXarchOption], "Disable delayed template parsing">,
  2130. BothFlags<[CoreOption]>>;
  2131. def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>,
  2132. Values<"single,multiple,virtual">, NormalizedValuesScope<"LangOptions">,
  2133. NormalizedValues<["PPTMK_FullGeneralitySingleInheritance", "PPTMK_FullGeneralityMultipleInheritance",
  2134. "PPTMK_FullGeneralityVirtualInheritance"]>,
  2135. MarshallingInfoEnum<LangOpts<"MSPointerToMemberRepresentationMethod">, "PPTMK_BestCase">;
  2136. def fms_kernel : Flag<["-"], "fms-kernel">, Group<f_Group>, Flags<[CC1Option, NoDriverOption]>,
  2137. MarshallingInfoFlag<LangOpts<"Kernel">>;
  2138. // __declspec is enabled by default for the PS4 by the driver, and also
  2139. // enabled for Microsoft Extensions or Borland Extensions, here.
  2140. //
  2141. // FIXME: __declspec is also currently enabled for CUDA, but isn't really a
  2142. // CUDA extension. However, it is required for supporting
  2143. // __clang_cuda_builtin_vars.h, which uses __declspec(property). Once that has
  2144. // been rewritten in terms of something more generic, remove the Opts.CUDA
  2145. // term here.
  2146. defm declspec : BoolOption<"f", "declspec",
  2147. LangOpts<"DeclSpecKeyword">, DefaultFalse,
  2148. PosFlag<SetTrue, [], "Allow", [fms_extensions.KeyPath, fborland_extensions.KeyPath, cuda.KeyPath]>,
  2149. NegFlag<SetFalse, [], "Disallow">,
  2150. BothFlags<[CC1Option], " __declspec as a keyword">>, Group<f_clang_Group>;
  2151. def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>,
  2152. Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
  2153. HelpText<"Specify the module cache path">;
  2154. def fmodules_user_build_path : Separate<["-"], "fmodules-user-build-path">, Group<i_Group>,
  2155. Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
  2156. HelpText<"Specify the module user build path">,
  2157. MarshallingInfoString<HeaderSearchOpts<"ModuleUserBuildPath">>;
  2158. def fprebuilt_module_path : Joined<["-"], "fprebuilt-module-path=">, Group<i_Group>,
  2159. Flags<[NoXarchOption, CC1Option]>, MetaVarName<"<directory>">,
  2160. HelpText<"Specify the prebuilt module path">;
  2161. defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules",
  2162. HeaderSearchOpts<"EnablePrebuiltImplicitModules">, DefaultFalse,
  2163. PosFlag<SetTrue, [], "Look up implicit modules in the prebuilt module path">,
  2164. NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option]>>;
  2165. def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, Flags<[NoXarchOption, CC1Option]>,
  2166. HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">;
  2167. def fmodule_output : Flag<["-"], "fmodule-output">, Flags<[NoXarchOption, CC1Option]>,
  2168. HelpText<"Save intermediate module file results when compiling a standard C++ module unit.">;
  2169. def fmodules_prune_interval : Joined<["-"], "fmodules-prune-interval=">, Group<i_Group>,
  2170. Flags<[CC1Option]>, MetaVarName<"<seconds>">,
  2171. HelpText<"Specify the interval (in seconds) between attempts to prune the module cache">,
  2172. MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneInterval">, "7 * 24 * 60 * 60">;
  2173. def fmodules_prune_after : Joined<["-"], "fmodules-prune-after=">, Group<i_Group>,
  2174. Flags<[CC1Option]>, MetaVarName<"<seconds>">,
  2175. HelpText<"Specify the interval (in seconds) after which a module file will be considered unused">,
  2176. MarshallingInfoInt<HeaderSearchOpts<"ModuleCachePruneAfter">, "31 * 24 * 60 * 60">;
  2177. def fbuild_session_timestamp : Joined<["-"], "fbuild-session-timestamp=">,
  2178. Group<i_Group>, Flags<[CC1Option]>, MetaVarName<"<time since Epoch in seconds>">,
  2179. HelpText<"Time when the current build session started">,
  2180. MarshallingInfoInt<HeaderSearchOpts<"BuildSessionTimestamp">, "0", "uint64_t">;
  2181. def fbuild_session_file : Joined<["-"], "fbuild-session-file=">,
  2182. Group<i_Group>, MetaVarName<"<file>">,
  2183. HelpText<"Use the last modification time of <file> as the build session timestamp">;
  2184. def fmodules_validate_once_per_build_session : Flag<["-"], "fmodules-validate-once-per-build-session">,
  2185. Group<i_Group>, Flags<[CC1Option]>,
  2186. HelpText<"Don't verify input files for the modules if the module has been "
  2187. "successfully validated or loaded during this build session">,
  2188. MarshallingInfoFlag<HeaderSearchOpts<"ModulesValidateOncePerBuildSession">>;
  2189. def fmodules_disable_diagnostic_validation : Flag<["-"], "fmodules-disable-diagnostic-validation">,
  2190. Group<i_Group>, Flags<[CC1Option]>,
  2191. HelpText<"Disable validation of the diagnostic options when loading the module">,
  2192. MarshallingInfoNegativeFlag<HeaderSearchOpts<"ModulesValidateDiagnosticOptions">>;
  2193. defm modules_validate_system_headers : BoolOption<"f", "modules-validate-system-headers",
  2194. HeaderSearchOpts<"ModulesValidateSystemHeaders">, DefaultFalse,
  2195. PosFlag<SetTrue, [CC1Option], "Validate the system headers that a module depends on when loading the module">,
  2196. NegFlag<SetFalse, [NoXarchOption]>>, Group<i_Group>;
  2197. def fno_modules_validate_textual_header_includes :
  2198. Flag<["-"], "fno-modules-validate-textual-header-includes">,
  2199. Group<f_Group>, Flags<[CC1Option, NoXarchOption]>,
  2200. MarshallingInfoNegativeFlag<LangOpts<"ModulesValidateTextualHeaderIncludes">>,
  2201. HelpText<"Do not enforce -fmodules-decluse and private header restrictions for textual headers. "
  2202. "This flag will be removed in a future Clang release.">;
  2203. def fincremental_extensions :
  2204. Flag<["-"], "fincremental-extensions">,
  2205. Group<f_Group>, Flags<[CC1Option]>,
  2206. HelpText<"Enable incremental processing extensions such as processing"
  2207. "statements on the global scope.">,
  2208. MarshallingInfoFlag<LangOpts<"IncrementalExtensions">>;
  2209. def fvalidate_ast_input_files_content:
  2210. Flag <["-"], "fvalidate-ast-input-files-content">,
  2211. Group<f_Group>, Flags<[CC1Option]>,
  2212. HelpText<"Compute and store the hash of input files used to build an AST."
  2213. " Files with mismatching mtime's are considered valid"
  2214. " if both contents is identical">,
  2215. MarshallingInfoFlag<HeaderSearchOpts<"ValidateASTInputFilesContent">>;
  2216. def fmodules_validate_input_files_content:
  2217. Flag <["-"], "fmodules-validate-input-files-content">,
  2218. Group<f_Group>, Flags<[NoXarchOption]>,
  2219. HelpText<"Validate PCM input files based on content if mtime differs">;
  2220. def fno_modules_validate_input_files_content:
  2221. Flag <["-"], "fno_modules-validate-input-files-content">,
  2222. Group<f_Group>, Flags<[NoXarchOption]>;
  2223. def fpch_validate_input_files_content:
  2224. Flag <["-"], "fpch-validate-input-files-content">,
  2225. Group<f_Group>, Flags<[NoXarchOption]>,
  2226. HelpText<"Validate PCH input files based on content if mtime differs">;
  2227. def fno_pch_validate_input_files_content:
  2228. Flag <["-"], "fno_pch-validate-input-files-content">,
  2229. Group<f_Group>, Flags<[NoXarchOption]>;
  2230. defm pch_instantiate_templates : BoolFOption<"pch-instantiate-templates",
  2231. LangOpts<"PCHInstantiateTemplates">, DefaultFalse,
  2232. PosFlag<SetTrue, [], "Instantiate templates already while building a PCH">,
  2233. NegFlag<SetFalse>, BothFlags<[CC1Option, CoreOption]>>;
  2234. defm pch_codegen: OptInCC1FFlag<"pch-codegen", "Generate ", "Do not generate ",
  2235. "code for uses of this PCH that assumes an explicit object file will be built for the PCH">;
  2236. defm pch_debuginfo: OptInCC1FFlag<"pch-debuginfo", "Generate ", "Do not generate ",
  2237. "debug info for types in an object file built from this PCH and do not generate them elsewhere">;
  2238. def fimplicit_module_maps : Flag <["-"], "fimplicit-module-maps">, Group<f_Group>,
  2239. Flags<[NoXarchOption, CC1Option, CoreOption]>,
  2240. HelpText<"Implicitly search the file system for module map files.">,
  2241. MarshallingInfoFlag<HeaderSearchOpts<"ImplicitModuleMaps">>;
  2242. def fmodules_ts : Flag <["-"], "fmodules-ts">, Group<f_Group>,
  2243. Flags<[CC1Option]>, HelpText<"Enable support for the C++ Modules TS">,
  2244. MarshallingInfoFlag<LangOpts<"ModulesTS">>;
  2245. defm modules : BoolFOption<"modules",
  2246. LangOpts<"Modules">, Default<!strconcat(fmodules_ts.KeyPath, "||", fcxx_modules.KeyPath)>,
  2247. PosFlag<SetTrue, [CC1Option], "Enable the 'modules' language feature">,
  2248. NegFlag<SetFalse>, BothFlags<[NoXarchOption, CoreOption]>>;
  2249. def fmodule_maps : Flag <["-"], "fmodule-maps">, Flags<[CoreOption]>, Alias<fimplicit_module_maps>;
  2250. def fmodule_name_EQ : Joined<["-"], "fmodule-name=">, Group<f_Group>,
  2251. Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<name>">,
  2252. HelpText<"Specify the name of the module to build">,
  2253. MarshallingInfoString<LangOpts<"ModuleName">>;
  2254. def fmodule_implementation_of : Separate<["-"], "fmodule-implementation-of">,
  2255. Flags<[CC1Option,CoreOption]>, Alias<fmodule_name_EQ>;
  2256. def fsystem_module : Flag<["-"], "fsystem-module">, Flags<[CC1Option,CoreOption]>,
  2257. HelpText<"Build this module as a system module. Only used with -emit-module">,
  2258. MarshallingInfoFlag<FrontendOpts<"IsSystemModule">>;
  2259. def fmodule_map_file : Joined<["-"], "fmodule-map-file=">,
  2260. Group<f_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"<file>">,
  2261. HelpText<"Load this module map file">,
  2262. MarshallingInfoStringVector<FrontendOpts<"ModuleMapFiles">>;
  2263. def fmodule_file : Joined<["-"], "fmodule-file=">,
  2264. Group<i_Group>, Flags<[NoXarchOption,CC1Option,CoreOption]>, MetaVarName<"[<name>=]<file>">,
  2265. HelpText<"Specify the mapping of module name to precompiled module file, or load a module file if name is omitted.">;
  2266. def fmodules_ignore_macro : Joined<["-"], "fmodules-ignore-macro=">, Group<f_Group>,
  2267. Flags<[CC1Option,CoreOption]>,
  2268. HelpText<"Ignore the definition of the given macro when building and loading modules">;
  2269. def fmodules_strict_decluse : Flag <["-"], "fmodules-strict-decluse">, Group<f_Group>,
  2270. Flags<[NoXarchOption,CC1Option,CoreOption]>,
  2271. HelpText<"Like -fmodules-decluse but requires all headers to be in modules">,
  2272. MarshallingInfoFlag<LangOpts<"ModulesStrictDeclUse">>;
  2273. defm modules_decluse : BoolFOption<"modules-decluse",
  2274. LangOpts<"ModulesDeclUse">, Default<fmodules_strict_decluse.KeyPath>,
  2275. PosFlag<SetTrue, [CC1Option], "Require declaration of modules used within a module">,
  2276. NegFlag<SetFalse>, BothFlags<[NoXarchOption,CoreOption]>>;
  2277. defm modules_search_all : BoolFOption<"modules-search-all",
  2278. LangOpts<"ModulesSearchAll">, DefaultFalse,
  2279. PosFlag<SetTrue, [], "Search even non-imported modules to resolve references">,
  2280. NegFlag<SetFalse>, BothFlags<[NoXarchOption, CC1Option,CoreOption]>>,
  2281. ShouldParseIf<fmodules.KeyPath>;
  2282. defm implicit_modules : BoolFOption<"implicit-modules",
  2283. LangOpts<"ImplicitModules">, DefaultTrue,
  2284. NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[NoXarchOption,CoreOption]>>;
  2285. def fretain_comments_from_system_headers : Flag<["-"], "fretain-comments-from-system-headers">, Group<f_Group>, Flags<[CC1Option]>,
  2286. MarshallingInfoFlag<LangOpts<"RetainCommentsFromSystemHeaders">>;
  2287. def fmodule_header : Flag <["-"], "fmodule-header">, Group<f_Group>,
  2288. Flags<[NoXarchOption]>, HelpText<"Build a C++20 Header Unit from a header.">;
  2289. def fmodule_header_EQ : Joined<["-"], "fmodule-header=">, Group<f_Group>,
  2290. Flags<[NoXarchOption]>, MetaVarName<"<kind>">,
  2291. HelpText<"Build a C++20 Header Unit from a header that should be found in the user (fmodule-header=user) or system (fmodule-header=system) search path.">;
  2292. def fno_knr_functions : Flag<["-"], "fno-knr-functions">, Group<f_Group>,
  2293. MarshallingInfoFlag<LangOpts<"DisableKNRFunctions">>,
  2294. HelpText<"Disable support for K&R C function declarations">,
  2295. Flags<[CC1Option, CoreOption]>;
  2296. def fmudflapth : Flag<["-"], "fmudflapth">, Group<f_Group>;
  2297. def fmudflap : Flag<["-"], "fmudflap">, Group<f_Group>;
  2298. def fnested_functions : Flag<["-"], "fnested-functions">, Group<f_Group>;
  2299. def fnext_runtime : Flag<["-"], "fnext-runtime">, Group<f_Group>;
  2300. def fno_asm : Flag<["-"], "fno-asm">, Group<f_Group>;
  2301. def fno_asynchronous_unwind_tables : Flag<["-"], "fno-asynchronous-unwind-tables">, Group<f_Group>;
  2302. def fno_assume_sane_operator_new : Flag<["-"], "fno-assume-sane-operator-new">, Group<f_Group>,
  2303. HelpText<"Don't assume that C++'s global operator new can't alias any pointer">,
  2304. Flags<[CC1Option]>, MarshallingInfoNegativeFlag<CodeGenOpts<"AssumeSaneOperatorNew">>;
  2305. def fno_builtin : Flag<["-"], "fno-builtin">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  2306. HelpText<"Disable implicit builtin knowledge of functions">;
  2307. def fno_builtin_ : Joined<["-"], "fno-builtin-">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  2308. HelpText<"Disable implicit builtin knowledge of a specific function">;
  2309. def fno_common : Flag<["-"], "fno-common">, Group<f_Group>, Flags<[CC1Option]>,
  2310. HelpText<"Compile common globals like normal definitions">;
  2311. defm digraphs : BoolFOption<"digraphs",
  2312. LangOpts<"Digraphs">, Default<std#".hasDigraphs()">,
  2313. PosFlag<SetTrue, [], "Enable alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:' (default)">,
  2314. NegFlag<SetFalse, [], "Disallow alternative token representations '<:', ':>', '<%', '%>', '%:', '%:%:'">,
  2315. BothFlags<[CC1Option]>>;
  2316. def fno_eliminate_unused_debug_symbols : Flag<["-"], "fno-eliminate-unused-debug-symbols">, Group<f_Group>;
  2317. def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>;
  2318. def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>;
  2319. def fno_global_isel : Flag<["-"], "fno-global-isel">, Group<f_clang_Group>,
  2320. HelpText<"Disables the global instruction selector">;
  2321. def fno_experimental_isel : Flag<["-"], "fno-experimental-isel">, Group<f_clang_Group>,
  2322. Alias<fno_global_isel>;
  2323. def fveclib : Joined<["-"], "fveclib=">, Group<f_Group>, Flags<[CC1Option]>,
  2324. HelpText<"Use the given vector functions library">,
  2325. Values<"Accelerate,libmvec,MASSV,SVML,SLEEF,Darwin_libsystem_m,none">,
  2326. NormalizedValuesScope<"CodeGenOptions">,
  2327. NormalizedValues<["Accelerate", "LIBMVEC", "MASSV", "SVML", "SLEEF",
  2328. "Darwin_libsystem_m", "NoLibrary"]>,
  2329. MarshallingInfoEnum<CodeGenOpts<"VecLib">, "NoLibrary">;
  2330. def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>,
  2331. Alias<flax_vector_conversions_EQ>, AliasArgs<["none"]>;
  2332. def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group<f_Group>,
  2333. Flags<[NoXarchOption]>;
  2334. def fno_module_maps : Flag <["-"], "fno-module-maps">, Alias<fno_implicit_module_maps>;
  2335. def fno_modules_strict_decluse : Flag <["-"], "fno-strict-modules-decluse">, Group<f_Group>,
  2336. Flags<[NoXarchOption]>;
  2337. def fmodule_file_deps : Flag <["-"], "fmodule-file-deps">, Group<f_Group>,
  2338. Flags<[NoXarchOption]>;
  2339. def fno_module_file_deps : Flag <["-"], "fno-module-file-deps">, Group<f_Group>,
  2340. Flags<[NoXarchOption]>;
  2341. def fno_ms_extensions : Flag<["-"], "fno-ms-extensions">, Group<f_Group>,
  2342. Flags<[CoreOption]>;
  2343. def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>,
  2344. Flags<[CoreOption]>;
  2345. def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>;
  2346. def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>;
  2347. def fno_omit_frame_pointer : Flag<["-"], "fno-omit-frame-pointer">, Group<f_Group>;
  2348. defm operator_names : BoolFOption<"operator-names",
  2349. LangOpts<"CXXOperatorNames">, Default<cplusplus.KeyPath>,
  2350. NegFlag<SetFalse, [CC1Option], "Do not treat C++ operator name keywords as synonyms for operators">,
  2351. PosFlag<SetTrue>>;
  2352. def fdiagnostics_absolute_paths : Flag<["-"], "fdiagnostics-absolute-paths">, Group<f_Group>,
  2353. Flags<[CC1Option, CoreOption]>, HelpText<"Print absolute paths in diagnostics">,
  2354. MarshallingInfoFlag<DiagnosticOpts<"AbsolutePath">>;
  2355. def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>,
  2356. HelpText<"Disable the use of stack protectors">;
  2357. def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>,
  2358. Flags<[NoXarchOption, CoreOption]>;
  2359. def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>;
  2360. def fno_struct_path_tbaa : Flag<["-"], "fno-struct-path-tbaa">, Group<f_Group>;
  2361. def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>;
  2362. def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>;
  2363. def fno_temp_file : Flag<["-"], "fno-temp-file">, Group<f_Group>,
  2364. Flags<[CC1Option, CoreOption]>, HelpText<
  2365. "Directly create compilation output files. This may lead to incorrect incremental builds if the compiler crashes">,
  2366. MarshallingInfoNegativeFlag<FrontendOpts<"UseTemporary">>;
  2367. defm use_cxa_atexit : BoolFOption<"use-cxa-atexit",
  2368. CodeGenOpts<"CXAAtExit">, DefaultTrue,
  2369. NegFlag<SetFalse, [CC1Option], "Don't use __cxa_atexit for calling destructors">,
  2370. PosFlag<SetTrue>>;
  2371. def fno_unwind_tables : Flag<["-"], "fno-unwind-tables">, Group<f_Group>;
  2372. def fno_verbose_asm : Flag<["-"], "fno-verbose-asm">, Group<f_Group>, Flags<[CC1Option]>,
  2373. MarshallingInfoNegativeFlag<CodeGenOpts<"AsmVerbose">>;
  2374. def fno_working_directory : Flag<["-"], "fno-working-directory">, Group<f_Group>;
  2375. def fno_wrapv : Flag<["-"], "fno-wrapv">, Group<f_Group>;
  2376. def fobjc_arc : Flag<["-"], "fobjc-arc">, Group<f_Group>, Flags<[CC1Option]>,
  2377. HelpText<"Synthesize retain and release calls for Objective-C pointers">;
  2378. def fno_objc_arc : Flag<["-"], "fno-objc-arc">, Group<f_Group>;
  2379. defm objc_encode_cxx_class_template_spec : BoolFOption<"objc-encode-cxx-class-template-spec",
  2380. LangOpts<"EncodeCXXClassTemplateSpec">, DefaultFalse,
  2381. PosFlag<SetTrue, [CC1Option], "Fully encode c++ class template specialization">,
  2382. NegFlag<SetFalse>>;
  2383. defm objc_convert_messages_to_runtime_calls : BoolFOption<"objc-convert-messages-to-runtime-calls",
  2384. CodeGenOpts<"ObjCConvertMessagesToRuntimeCalls">, DefaultTrue,
  2385. NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>>;
  2386. defm objc_arc_exceptions : BoolFOption<"objc-arc-exceptions",
  2387. CodeGenOpts<"ObjCAutoRefCountExceptions">, DefaultFalse,
  2388. PosFlag<SetTrue, [CC1Option], "Use EH-safe code when synthesizing retains and releases in -fobjc-arc">,
  2389. NegFlag<SetFalse>>;
  2390. def fobjc_atdefs : Flag<["-"], "fobjc-atdefs">, Group<clang_ignored_f_Group>;
  2391. def fobjc_call_cxx_cdtors : Flag<["-"], "fobjc-call-cxx-cdtors">, Group<clang_ignored_f_Group>;
  2392. defm objc_exceptions : BoolFOption<"objc-exceptions",
  2393. LangOpts<"ObjCExceptions">, DefaultFalse,
  2394. PosFlag<SetTrue, [CC1Option], "Enable Objective-C exceptions">, NegFlag<SetFalse>>;
  2395. defm application_extension : BoolFOption<"application-extension",
  2396. LangOpts<"AppExt">, DefaultFalse,
  2397. PosFlag<SetTrue, [CC1Option], "Restrict code to those available for App Extensions">,
  2398. NegFlag<SetFalse>>;
  2399. defm relaxed_template_template_args : BoolFOption<"relaxed-template-template-args",
  2400. LangOpts<"RelaxedTemplateTemplateArgs">, DefaultFalse,
  2401. PosFlag<SetTrue, [CC1Option], "Enable C++17 relaxed template template argument matching">,
  2402. NegFlag<SetFalse>>;
  2403. defm sized_deallocation : BoolFOption<"sized-deallocation",
  2404. LangOpts<"SizedDeallocation">, DefaultFalse,
  2405. PosFlag<SetTrue, [CC1Option], "Enable C++14 sized global deallocation functions">,
  2406. NegFlag<SetFalse>>;
  2407. defm aligned_allocation : BoolFOption<"aligned-allocation",
  2408. LangOpts<"AlignedAllocation">, Default<cpp17.KeyPath>,
  2409. PosFlag<SetTrue, [], "Enable C++17 aligned allocation functions">,
  2410. NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
  2411. def fnew_alignment_EQ : Joined<["-"], "fnew-alignment=">,
  2412. HelpText<"Specifies the largest alignment guaranteed by '::operator new(size_t)'">,
  2413. MetaVarName<"<align>">, Group<f_Group>, Flags<[CC1Option]>,
  2414. MarshallingInfoInt<LangOpts<"NewAlignOverride">>;
  2415. def : Separate<["-"], "fnew-alignment">, Alias<fnew_alignment_EQ>;
  2416. def : Flag<["-"], "faligned-new">, Alias<faligned_allocation>;
  2417. def : Flag<["-"], "fno-aligned-new">, Alias<fno_aligned_allocation>;
  2418. def faligned_new_EQ : Joined<["-"], "faligned-new=">;
  2419. def fobjc_legacy_dispatch : Flag<["-"], "fobjc-legacy-dispatch">, Group<f_Group>;
  2420. def fobjc_new_property : Flag<["-"], "fobjc-new-property">, Group<clang_ignored_f_Group>;
  2421. defm objc_infer_related_result_type : BoolFOption<"objc-infer-related-result-type",
  2422. LangOpts<"ObjCInferRelatedResultType">, DefaultTrue,
  2423. NegFlag<SetFalse, [CC1Option], "do not infer Objective-C related result type based on method family">,
  2424. PosFlag<SetTrue>>;
  2425. def fobjc_link_runtime: Flag<["-"], "fobjc-link-runtime">, Group<f_Group>;
  2426. def fobjc_weak : Flag<["-"], "fobjc-weak">, Group<f_Group>, Flags<[CC1Option]>,
  2427. HelpText<"Enable ARC-style weak references in Objective-C">;
  2428. // Objective-C ABI options.
  2429. def fobjc_runtime_EQ : Joined<["-"], "fobjc-runtime=">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  2430. HelpText<"Specify the target Objective-C runtime kind and version">;
  2431. def fobjc_abi_version_EQ : Joined<["-"], "fobjc-abi-version=">, Group<f_Group>;
  2432. def fobjc_nonfragile_abi_version_EQ : Joined<["-"], "fobjc-nonfragile-abi-version=">, Group<f_Group>;
  2433. def fobjc_nonfragile_abi : Flag<["-"], "fobjc-nonfragile-abi">, Group<f_Group>;
  2434. def fno_objc_nonfragile_abi : Flag<["-"], "fno-objc-nonfragile-abi">, Group<f_Group>;
  2435. def fobjc_sender_dependent_dispatch : Flag<["-"], "fobjc-sender-dependent-dispatch">, Group<f_Group>;
  2436. def fobjc_disable_direct_methods_for_testing :
  2437. Flag<["-"], "fobjc-disable-direct-methods-for-testing">,
  2438. Group<f_Group>, Flags<[CC1Option]>,
  2439. HelpText<"Ignore attribute objc_direct so that direct methods can be tested">,
  2440. MarshallingInfoFlag<LangOpts<"ObjCDisableDirectMethodsForTesting">>;
  2441. defm objc_avoid_heapify_local_blocks : BoolFOption<"objc-avoid-heapify-local-blocks",
  2442. CodeGenOpts<"ObjCAvoidHeapifyLocalBlocks">, DefaultFalse,
  2443. PosFlag<SetTrue, [], "Try">,
  2444. NegFlag<SetFalse, [], "Don't try">,
  2445. BothFlags<[CC1Option, NoDriverOption], " to avoid heapifying local blocks">>;
  2446. def fomit_frame_pointer : Flag<["-"], "fomit-frame-pointer">, Group<f_Group>;
  2447. def fopenmp : Flag<["-"], "fopenmp">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, FlangOption, FC1Option]>,
  2448. HelpText<"Parse OpenMP pragmas and generate parallel code.">;
  2449. def fno_openmp : Flag<["-"], "fno-openmp">, Group<f_Group>, Flags<[NoArgumentUnused]>;
  2450. def fopenmp_version_EQ : Joined<["-"], "fopenmp-version=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
  2451. HelpText<"Set OpenMP version (e.g. 45 for OpenMP 4.5, 50 for OpenMP 5.0). Default value is 50.">;
  2452. defm openmp_extensions: BoolFOption<"openmp-extensions",
  2453. LangOpts<"OpenMPExtensions">, DefaultTrue,
  2454. PosFlag<SetTrue, [CC1Option, NoArgumentUnused],
  2455. "Enable all Clang extensions for OpenMP directives and clauses">,
  2456. NegFlag<SetFalse, [CC1Option, NoArgumentUnused],
  2457. "Disable all Clang extensions for OpenMP directives and clauses">>;
  2458. def fopenmp_EQ : Joined<["-"], "fopenmp=">, Group<f_Group>;
  2459. def fopenmp_use_tls : Flag<["-"], "fopenmp-use-tls">, Group<f_Group>,
  2460. Flags<[NoArgumentUnused, HelpHidden]>;
  2461. def fnoopenmp_use_tls : Flag<["-"], "fnoopenmp-use-tls">, Group<f_Group>,
  2462. Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2463. def fopenmp_targets_EQ : CommaJoined<["-"], "fopenmp-targets=">, Flags<[NoXarchOption, CC1Option]>,
  2464. HelpText<"Specify comma-separated list of triples OpenMP offloading targets to be supported">;
  2465. def fopenmp_relocatable_target : Flag<["-"], "fopenmp-relocatable-target">,
  2466. Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2467. def fnoopenmp_relocatable_target : Flag<["-"], "fnoopenmp-relocatable-target">,
  2468. Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2469. def fopenmp_simd : Flag<["-"], "fopenmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
  2470. HelpText<"Emit OpenMP code only for SIMD-based constructs.">;
  2471. def fopenmp_enable_irbuilder : Flag<["-"], "fopenmp-enable-irbuilder">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
  2472. HelpText<"Use the experimental OpenMP-IR-Builder codegen path.">;
  2473. def fno_openmp_simd : Flag<["-"], "fno-openmp-simd">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>;
  2474. def fopenmp_cuda_mode : Flag<["-"], "fopenmp-cuda-mode">, Group<f_Group>,
  2475. Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2476. def fno_openmp_cuda_mode : Flag<["-"], "fno-openmp-cuda-mode">, Group<f_Group>,
  2477. Flags<[NoArgumentUnused, HelpHidden]>;
  2478. def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>,
  2479. Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2480. def fopenmp_cuda_blocks_per_sm_EQ : Joined<["-"], "fopenmp-cuda-blocks-per-sm=">, Group<f_Group>,
  2481. Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2482. def fopenmp_cuda_teams_reduction_recs_num_EQ : Joined<["-"], "fopenmp-cuda-teams-reduction-recs-num=">, Group<f_Group>,
  2483. Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2484. def fopenmp_target_debug : Flag<["-"], "fopenmp-target-debug">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused]>,
  2485. HelpText<"Enable debugging in the OpenMP offloading device RTL">;
  2486. def fno_openmp_target_debug : Flag<["-"], "fno-openmp-target-debug">, Group<f_Group>, Flags<[NoArgumentUnused]>;
  2487. def fopenmp_target_debug_EQ : Joined<["-"], "fopenmp-target-debug=">, Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2488. def fopenmp_assume_teams_oversubscription : Flag<["-"], "fopenmp-assume-teams-oversubscription">,
  2489. Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2490. def fopenmp_assume_threads_oversubscription : Flag<["-"], "fopenmp-assume-threads-oversubscription">,
  2491. Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2492. def fno_openmp_assume_teams_oversubscription : Flag<["-"], "fno-openmp-assume-teams-oversubscription">,
  2493. Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2494. def fno_openmp_assume_threads_oversubscription : Flag<["-"], "fno-openmp-assume-threads-oversubscription">,
  2495. Group<f_Group>, Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
  2496. def fopenmp_assume_no_thread_state : Flag<["-"], "fopenmp-assume-no-thread-state">, Group<f_Group>,
  2497. Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
  2498. HelpText<"Assert no thread in a parallel region modifies an ICV">,
  2499. MarshallingInfoFlag<LangOpts<"OpenMPNoThreadState">>;
  2500. def fopenmp_assume_no_nested_parallelism : Flag<["-"], "fopenmp-assume-no-nested-parallelism">, Group<f_Group>,
  2501. Flags<[CC1Option, NoArgumentUnused, HelpHidden]>,
  2502. HelpText<"Assert no nested parallel regions in the GPU">,
  2503. MarshallingInfoFlag<LangOpts<"OpenMPNoNestedParallelism">>;
  2504. def fopenmp_offload_mandatory : Flag<["-"], "fopenmp-offload-mandatory">, Group<f_Group>,
  2505. Flags<[CC1Option, NoArgumentUnused]>,
  2506. HelpText<"Do not create a host fallback if offloading to the device fails.">,
  2507. MarshallingInfoFlag<LangOpts<"OpenMPOffloadMandatory">>;
  2508. def fopenmp_target_jit : Flag<["-"], "fopenmp-target-jit">, Group<f_Group>,
  2509. Flags<[CoreOption, NoArgumentUnused]>,
  2510. HelpText<"Emit code that can be JIT compiled for OpenMP offloading. Implies -foffload-lto=full">;
  2511. def fno_openmp_target_jit : Flag<["-"], "fno-openmp-target-jit">, Group<f_Group>,
  2512. Flags<[CoreOption, NoArgumentUnused, HelpHidden]>;
  2513. def fopenmp_target_new_runtime : Flag<["-"], "fopenmp-target-new-runtime">,
  2514. Group<f_Group>, Flags<[CC1Option, HelpHidden]>;
  2515. def fno_openmp_target_new_runtime : Flag<["-"], "fno-openmp-target-new-runtime">,
  2516. Group<f_Group>, Flags<[CC1Option, HelpHidden]>;
  2517. defm openmp_optimistic_collapse : BoolFOption<"openmp-optimistic-collapse",
  2518. LangOpts<"OpenMPOptimisticCollapse">, DefaultFalse,
  2519. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[NoArgumentUnused, HelpHidden]>>;
  2520. def static_openmp: Flag<["-"], "static-openmp">,
  2521. HelpText<"Use the static host OpenMP runtime while linking.">;
  2522. def offload_new_driver : Flag<["--"], "offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>,
  2523. MarshallingInfoFlag<LangOpts<"OffloadingNewDriver">>, HelpText<"Use the new driver for offloading compilation.">;
  2524. def no_offload_new_driver : Flag<["--"], "no-offload-new-driver">, Flags<[CC1Option]>, Group<f_Group>,
  2525. HelpText<"Don't Use the new driver for offloading compilation.">;
  2526. def offload_device_only : Flag<["--"], "offload-device-only">,
  2527. HelpText<"Only compile for the offloading device.">;
  2528. def offload_host_only : Flag<["--"], "offload-host-only">,
  2529. HelpText<"Only compile for the offloading host.">;
  2530. def offload_host_device : Flag<["--"], "offload-host-device">,
  2531. HelpText<"Only compile for the offloading host.">;
  2532. def cuda_device_only : Flag<["--"], "cuda-device-only">, Alias<offload_device_only>,
  2533. HelpText<"Compile CUDA code for device only">;
  2534. def cuda_host_only : Flag<["--"], "cuda-host-only">, Alias<offload_host_only>,
  2535. HelpText<"Compile CUDA code for host only. Has no effect on non-CUDA compilations.">;
  2536. def cuda_compile_host_device : Flag<["--"], "cuda-compile-host-device">, Alias<offload_host_device>,
  2537. HelpText<"Compile CUDA code for both host and device (default). Has no "
  2538. "effect on non-CUDA compilations.">;
  2539. def fopenmp_new_driver : Flag<["-"], "fopenmp-new-driver">, Flags<[HelpHidden]>,
  2540. HelpText<"Use the new driver for OpenMP offloading.">;
  2541. def fno_openmp_new_driver : Flag<["-"], "fno-openmp-new-driver">, Flags<[HelpHidden]>,
  2542. HelpText<"Don't use the new driver for OpenMP offloading.">;
  2543. def fno_optimize_sibling_calls : Flag<["-"], "fno-optimize-sibling-calls">, Group<f_Group>, Flags<[CC1Option]>,
  2544. HelpText<"Disable tail call optimization, keeping the call stack accurate">,
  2545. MarshallingInfoFlag<CodeGenOpts<"DisableTailCalls">>;
  2546. def foptimize_sibling_calls : Flag<["-"], "foptimize-sibling-calls">, Group<f_Group>;
  2547. defm escaping_block_tail_calls : BoolFOption<"escaping-block-tail-calls",
  2548. CodeGenOpts<"NoEscapingBlockTailCalls">, DefaultFalse,
  2549. NegFlag<SetTrue, [CC1Option]>, PosFlag<SetFalse>>;
  2550. def force__cpusubtype__ALL : Flag<["-"], "force_cpusubtype_ALL">;
  2551. def force__flat__namespace : Flag<["-"], "force_flat_namespace">;
  2552. def force__load : Separate<["-"], "force_load">;
  2553. def force_addr : Joined<["-"], "fforce-addr">, Group<clang_ignored_f_Group>;
  2554. def foutput_class_dir_EQ : Joined<["-"], "foutput-class-dir=">, Group<f_Group>;
  2555. def fpack_struct : Flag<["-"], "fpack-struct">, Group<f_Group>;
  2556. def fno_pack_struct : Flag<["-"], "fno-pack-struct">, Group<f_Group>;
  2557. def fpack_struct_EQ : Joined<["-"], "fpack-struct=">, Group<f_Group>, Flags<[CC1Option]>,
  2558. HelpText<"Specify the default maximum struct packing alignment">,
  2559. MarshallingInfoInt<LangOpts<"PackStruct">>;
  2560. def fmax_type_align_EQ : Joined<["-"], "fmax-type-align=">, Group<f_Group>, Flags<[CC1Option]>,
  2561. HelpText<"Specify the maximum alignment to enforce on pointers lacking an explicit alignment">,
  2562. MarshallingInfoInt<LangOpts<"MaxTypeAlign">>;
  2563. def fno_max_type_align : Flag<["-"], "fno-max-type-align">, Group<f_Group>;
  2564. defm pascal_strings : BoolFOption<"pascal-strings",
  2565. LangOpts<"PascalStrings">, DefaultFalse,
  2566. PosFlag<SetTrue, [CC1Option], "Recognize and construct Pascal-style string literals">,
  2567. NegFlag<SetFalse>>;
  2568. // Note: This flag has different semantics in the driver and in -cc1. The driver accepts -fpatchable-function-entry=M,N
  2569. // and forwards it to -cc1 as -fpatchable-function-entry=M and -fpatchable-function-entry-offset=N. In -cc1, both flags
  2570. // are treated as a single integer.
  2571. def fpatchable_function_entry_EQ : Joined<["-"], "fpatchable-function-entry=">, Group<f_Group>, Flags<[CC1Option]>,
  2572. MetaVarName<"<N,M>">, HelpText<"Generate M NOPs before function entry and N-M NOPs after function entry">,
  2573. MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryCount">>;
  2574. def fms_hotpatch : Flag<["-"], "fms-hotpatch">, Group<f_Group>, Flags<[CC1Option, CoreOption]>,
  2575. HelpText<"Ensure that all functions can be hotpatched at runtime">,
  2576. MarshallingInfoFlag<CodeGenOpts<"HotPatch">>;
  2577. def fpcc_struct_return : Flag<["-"], "fpcc-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
  2578. HelpText<"Override the default ABI to return all structs on the stack">;
  2579. def fpch_preprocess : Flag<["-"], "fpch-preprocess">, Group<f_Group>;
  2580. def fpic : Flag<["-"], "fpic">, Group<f_Group>;
  2581. def fno_pic : Flag<["-"], "fno-pic">, Group<f_Group>;
  2582. def fpie : Flag<["-"], "fpie">, Group<f_Group>;
  2583. def fno_pie : Flag<["-"], "fno-pie">, Group<f_Group>;
  2584. defm pic_data_is_text_relative : SimpleMFlag<"pic-data-is-text-relative",
  2585. "Assume", "Don't assume", " data segments are relative to text segment">;
  2586. def fdirect_access_external_data : Flag<["-"], "fdirect-access-external-data">, Group<f_Group>, Flags<[CC1Option]>,
  2587. HelpText<"Don't use GOT indirection to reference external data symbols">;
  2588. def fno_direct_access_external_data : Flag<["-"], "fno-direct-access-external-data">, Group<f_Group>, Flags<[CC1Option]>,
  2589. HelpText<"Use GOT indirection to reference external data symbols">;
  2590. defm plt : BoolFOption<"plt",
  2591. CodeGenOpts<"NoPLT">, DefaultFalse,
  2592. NegFlag<SetTrue, [CC1Option], "Use GOT indirection instead of PLT to make external function calls (x86 only)">,
  2593. PosFlag<SetFalse>>;
  2594. defm ropi : BoolFOption<"ropi",
  2595. LangOpts<"ROPI">, DefaultFalse,
  2596. PosFlag<SetTrue, [CC1Option], "Generate read-only position independent code (ARM only)">,
  2597. NegFlag<SetFalse>>;
  2598. defm rwpi : BoolFOption<"rwpi",
  2599. LangOpts<"RWPI">, DefaultFalse,
  2600. PosFlag<SetTrue, [CC1Option], "Generate read-write position independent code (ARM only)">,
  2601. NegFlag<SetFalse>>;
  2602. def fplugin_EQ : Joined<["-"], "fplugin=">, Group<f_Group>, Flags<[NoXarchOption]>, MetaVarName<"<dsopath>">,
  2603. HelpText<"Load the named plugin (dynamic shared object)">;
  2604. def fplugin_arg : Joined<["-"], "fplugin-arg-">,
  2605. MetaVarName<"<name>-<arg>">,
  2606. HelpText<"Pass <arg> to plugin <name>">;
  2607. def fpass_plugin_EQ : Joined<["-"], "fpass-plugin=">,
  2608. Group<f_Group>, Flags<[CC1Option,FlangOption,FC1Option]>, MetaVarName<"<dsopath>">,
  2609. HelpText<"Load pass plugin from a dynamic shared object file (only with new pass manager).">,
  2610. MarshallingInfoStringVector<CodeGenOpts<"PassPlugins">>;
  2611. defm preserve_as_comments : BoolFOption<"preserve-as-comments",
  2612. CodeGenOpts<"PreserveAsmComments">, DefaultTrue,
  2613. NegFlag<SetFalse, [CC1Option], "Do not preserve comments in inline assembly">,
  2614. PosFlag<SetTrue>>;
  2615. def framework : Separate<["-"], "framework">, Flags<[LinkerInput]>;
  2616. def frandom_seed_EQ : Joined<["-"], "frandom-seed=">, Group<clang_ignored_f_Group>;
  2617. def freg_struct_return : Flag<["-"], "freg-struct-return">, Group<f_Group>, Flags<[CC1Option]>,
  2618. HelpText<"Override the default ABI to return small structs in registers">;
  2619. defm rtti : BoolFOption<"rtti",
  2620. LangOpts<"RTTI">, Default<cplusplus.KeyPath>,
  2621. NegFlag<SetFalse, [CC1Option], "Disable generation of rtti information">,
  2622. PosFlag<SetTrue>>, ShouldParseIf<cplusplus.KeyPath>;
  2623. defm rtti_data : BoolFOption<"rtti-data",
  2624. LangOpts<"RTTIData">, Default<frtti.KeyPath>,
  2625. NegFlag<SetFalse, [CC1Option], "Disable generation of RTTI data">,
  2626. PosFlag<SetTrue>>, ShouldParseIf<frtti.KeyPath>;
  2627. def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>;
  2628. defm short_enums : BoolFOption<"short-enums",
  2629. LangOpts<"ShortEnums">, DefaultFalse,
  2630. PosFlag<SetTrue, [CC1Option], "Allocate to an enum type only as many bytes as it"
  2631. " needs for the declared range of possible values">,
  2632. NegFlag<SetFalse>>;
  2633. defm char8__t : BoolFOption<"char8_t",
  2634. LangOpts<"Char8">, Default<cpp20.KeyPath>,
  2635. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
  2636. BothFlags<[CC1Option], " C++ builtin type char8_t">>;
  2637. def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>,
  2638. HelpText<"Force wchar_t to be a short unsigned int">;
  2639. def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>,
  2640. HelpText<"Force wchar_t to be an unsigned int">;
  2641. def fshow_overloads_EQ : Joined<["-"], "fshow-overloads=">, Group<f_Group>, Flags<[CC1Option]>,
  2642. HelpText<"Which overload candidates to show when overload resolution fails. Defaults to 'all'">,
  2643. Values<"best,all">,
  2644. NormalizedValues<["Ovl_Best", "Ovl_All"]>,
  2645. MarshallingInfoEnum<DiagnosticOpts<"ShowOverloads">, "Ovl_All">;
  2646. defm show_column : BoolFOption<"show-column",
  2647. DiagnosticOpts<"ShowColumn">, DefaultTrue,
  2648. NegFlag<SetFalse, [CC1Option], "Do not include column number on diagnostics">,
  2649. PosFlag<SetTrue>>;
  2650. defm show_source_location : BoolFOption<"show-source-location",
  2651. DiagnosticOpts<"ShowLocation">, DefaultTrue,
  2652. NegFlag<SetFalse, [CC1Option], "Do not include source location information with diagnostics">,
  2653. PosFlag<SetTrue>>;
  2654. defm spell_checking : BoolFOption<"spell-checking",
  2655. LangOpts<"SpellChecking">, DefaultTrue,
  2656. NegFlag<SetFalse, [CC1Option], "Disable spell-checking">, PosFlag<SetTrue>>;
  2657. def fspell_checking_limit_EQ : Joined<["-"], "fspell-checking-limit=">, Group<f_Group>;
  2658. def fsigned_bitfields : Flag<["-"], "fsigned-bitfields">, Group<f_Group>;
  2659. defm signed_char : BoolFOption<"signed-char",
  2660. LangOpts<"CharIsSigned">, DefaultTrue,
  2661. NegFlag<SetFalse, [CC1Option], "char is unsigned">, PosFlag<SetTrue, [], "char is signed">>,
  2662. ShouldParseIf<!strconcat("!", open_cl.KeyPath)>;
  2663. defm split_stack : BoolFOption<"split-stack",
  2664. CodeGenOpts<"EnableSegmentedStacks">, DefaultFalse,
  2665. NegFlag<SetFalse, [], "Wouldn't use segmented stack">,
  2666. PosFlag<SetTrue, [CC1Option], "Use segmented stack">>;
  2667. def fstack_protector_all : Flag<["-"], "fstack-protector-all">, Group<f_Group>,
  2668. HelpText<"Enable stack protectors for all functions">;
  2669. defm stack_clash_protection : BoolFOption<"stack-clash-protection",
  2670. CodeGenOpts<"StackClashProtector">, DefaultFalse,
  2671. PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
  2672. BothFlags<[], " stack clash protection">>;
  2673. def fstack_protector_strong : Flag<["-"], "fstack-protector-strong">, Group<f_Group>,
  2674. HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
  2675. "Compared to -fstack-protector, this uses a stronger heuristic "
  2676. "that includes functions containing arrays of any size (and any type), "
  2677. "as well as any calls to alloca or the taking of an address from a local variable">;
  2678. def fstack_protector : Flag<["-"], "fstack-protector">, Group<f_Group>,
  2679. HelpText<"Enable stack protectors for some functions vulnerable to stack smashing. "
  2680. "This uses a loose heuristic which considers functions vulnerable if they "
  2681. "contain a char (or 8bit integer) array or constant sized calls to alloca "
  2682. ", which are of greater size than ssp-buffer-size (default: 8 bytes). All "
  2683. "variable sized calls to alloca are considered vulnerable. A function with "
  2684. "a stack protector has a guard value added to the stack frame that is "
  2685. "checked on function exit. The guard value must be positioned in the "
  2686. "stack frame such that a buffer overflow from a vulnerable variable will "
  2687. "overwrite the guard value before overwriting the function's return "
  2688. "address. The reference stack guard value is stored in a global variable.">;
  2689. def ftrivial_auto_var_init : Joined<["-"], "ftrivial-auto-var-init=">, Group<f_Group>,
  2690. Flags<[CC1Option, CoreOption]>, HelpText<"Initialize trivial automatic stack variables. Defaults to 'uninitialized'">,
  2691. Values<"uninitialized,zero,pattern">,
  2692. NormalizedValuesScope<"LangOptions::TrivialAutoVarInitKind">,
  2693. NormalizedValues<["Uninitialized", "Zero", "Pattern"]>,
  2694. MarshallingInfoEnum<LangOpts<"TrivialAutoVarInit">, "Uninitialized">;
  2695. def ftrivial_auto_var_init_stop_after : Joined<["-"], "ftrivial-auto-var-init-stop-after=">, Group<f_Group>,
  2696. Flags<[CC1Option, CoreOption]>, HelpText<"Stop initializing trivial automatic stack variables after the specified number of instances">,
  2697. MarshallingInfoInt<LangOpts<"TrivialAutoVarInitStopAfter">>;
  2698. def fstandalone_debug : Flag<["-"], "fstandalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
  2699. HelpText<"Emit full debug info for all types used by the program">;
  2700. def fno_standalone_debug : Flag<["-"], "fno-standalone-debug">, Group<f_Group>, Flags<[CoreOption]>,
  2701. HelpText<"Limit debug information produced to reduce size of debug binary">;
  2702. def flimit_debug_info : Flag<["-"], "flimit-debug-info">, Flags<[CoreOption]>, Alias<fno_standalone_debug>;
  2703. def fno_limit_debug_info : Flag<["-"], "fno-limit-debug-info">, Flags<[CoreOption]>, Alias<fstandalone_debug>;
  2704. def fdebug_macro : Flag<["-"], "fdebug-macro">, Group<f_Group>, Flags<[CoreOption]>,
  2705. HelpText<"Emit macro debug information">;
  2706. def fno_debug_macro : Flag<["-"], "fno-debug-macro">, Group<f_Group>, Flags<[CoreOption]>,
  2707. HelpText<"Do not emit macro debug information">;
  2708. def fstrict_aliasing : Flag<["-"], "fstrict-aliasing">, Group<f_Group>,
  2709. Flags<[NoXarchOption, CoreOption]>;
  2710. def fstrict_enums : Flag<["-"], "fstrict-enums">, Group<f_Group>, Flags<[CC1Option]>,
  2711. HelpText<"Enable optimizations based on the strict definition of an enum's "
  2712. "value range">,
  2713. MarshallingInfoFlag<CodeGenOpts<"StrictEnums">>;
  2714. defm strict_vtable_pointers : BoolFOption<"strict-vtable-pointers",
  2715. CodeGenOpts<"StrictVTablePointers">, DefaultFalse,
  2716. PosFlag<SetTrue, [CC1Option], "Enable optimizations based on the strict rules for"
  2717. " overwriting polymorphic C++ objects">,
  2718. NegFlag<SetFalse>>;
  2719. def fstrict_overflow : Flag<["-"], "fstrict-overflow">, Group<f_Group>;
  2720. def fdriver_only : Flag<["-"], "fdriver-only">, Flags<[NoXarchOption, CoreOption]>,
  2721. Group<Action_Group>, HelpText<"Only run the driver.">;
  2722. def fsyntax_only : Flag<["-"], "fsyntax-only">,
  2723. Flags<[NoXarchOption,CoreOption,CC1Option,FC1Option,FlangOption]>, Group<Action_Group>,
  2724. HelpText<"Run the preprocessor, parser and semantic analysis stages">;
  2725. def ftabstop_EQ : Joined<["-"], "ftabstop=">, Group<f_Group>;
  2726. def ftemplate_depth_EQ : Joined<["-"], "ftemplate-depth=">, Group<f_Group>;
  2727. def ftemplate_depth_ : Joined<["-"], "ftemplate-depth-">, Group<f_Group>;
  2728. def ftemplate_backtrace_limit_EQ : Joined<["-"], "ftemplate-backtrace-limit=">,
  2729. Group<f_Group>;
  2730. def foperator_arrow_depth_EQ : Joined<["-"], "foperator-arrow-depth=">,
  2731. Group<f_Group>;
  2732. def fsave_optimization_record : Flag<["-"], "fsave-optimization-record">,
  2733. Group<f_Group>, HelpText<"Generate a YAML optimization record file">;
  2734. def fsave_optimization_record_EQ : Joined<["-"], "fsave-optimization-record=">,
  2735. Group<f_Group>, HelpText<"Generate an optimization record file in a specific format">,
  2736. MetaVarName<"<format>">;
  2737. def fno_save_optimization_record : Flag<["-"], "fno-save-optimization-record">,
  2738. Group<f_Group>, Flags<[NoArgumentUnused]>;
  2739. def foptimization_record_file_EQ : Joined<["-"], "foptimization-record-file=">,
  2740. Group<f_Group>,
  2741. HelpText<"Specify the output name of the file containing the optimization remarks. Implies -fsave-optimization-record. On Darwin platforms, this cannot be used with multiple -arch <arch> options.">,
  2742. MetaVarName<"<file>">;
  2743. def foptimization_record_passes_EQ : Joined<["-"], "foptimization-record-passes=">,
  2744. Group<f_Group>,
  2745. HelpText<"Only include passes which match a specified regular expression in the generated optimization record (by default, include all passes)">,
  2746. MetaVarName<"<regex>">;
  2747. def fvectorize : Flag<["-"], "fvectorize">, Group<f_Group>,
  2748. HelpText<"Enable the loop vectorization passes">;
  2749. def fno_vectorize : Flag<["-"], "fno-vectorize">, Group<f_Group>;
  2750. def : Flag<["-"], "ftree-vectorize">, Alias<fvectorize>;
  2751. def : Flag<["-"], "fno-tree-vectorize">, Alias<fno_vectorize>;
  2752. def fslp_vectorize : Flag<["-"], "fslp-vectorize">, Group<f_Group>,
  2753. HelpText<"Enable the superword-level parallelism vectorization passes">;
  2754. def fno_slp_vectorize : Flag<["-"], "fno-slp-vectorize">, Group<f_Group>;
  2755. def : Flag<["-"], "ftree-slp-vectorize">, Alias<fslp_vectorize>;
  2756. def : Flag<["-"], "fno-tree-slp-vectorize">, Alias<fno_slp_vectorize>;
  2757. def Wlarge_by_value_copy_def : Flag<["-"], "Wlarge-by-value-copy">,
  2758. HelpText<"Warn if a function definition returns or accepts an object larger "
  2759. "in bytes than a given value">, Flags<[HelpHidden]>;
  2760. def Wlarge_by_value_copy_EQ : Joined<["-"], "Wlarge-by-value-copy=">, Flags<[CC1Option]>,
  2761. MarshallingInfoInt<LangOpts<"NumLargeByValueCopy">>;
  2762. // These "special" warning flags are effectively processed as f_Group flags by the driver:
  2763. // Just silence warnings about -Wlarger-than for now.
  2764. def Wlarger_than_EQ : Joined<["-"], "Wlarger-than=">, Group<clang_ignored_f_Group>;
  2765. def Wlarger_than_ : Joined<["-"], "Wlarger-than-">, Alias<Wlarger_than_EQ>;
  2766. // This is converted to -fwarn-stack-size=N and also passed through by the driver.
  2767. // FIXME: The driver should strip out the =<value> when passing W_value_Group through.
  2768. def Wframe_larger_than_EQ : Joined<["-"], "Wframe-larger-than=">, Group<W_value_Group>,
  2769. Flags<[NoXarchOption, CC1Option]>;
  2770. def Wframe_larger_than : Flag<["-"], "Wframe-larger-than">, Alias<Wframe_larger_than_EQ>;
  2771. def : Flag<["-"], "fterminated-vtables">, Alias<fapple_kext>;
  2772. defm threadsafe_statics : BoolFOption<"threadsafe-statics",
  2773. LangOpts<"ThreadsafeStatics">, DefaultTrue,
  2774. NegFlag<SetFalse, [CC1Option], "Do not emit code to make initialization of local statics thread safe">,
  2775. PosFlag<SetTrue>>;
  2776. def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>,
  2777. MarshallingInfoFlag<CodeGenOpts<"TimePasses">>;
  2778. def ftime_report_EQ: Joined<["-"], "ftime-report=">, Group<f_Group>,
  2779. Flags<[CC1Option]>, Values<"per-pass,per-pass-run">,
  2780. MarshallingInfoFlag<CodeGenOpts<"TimePassesPerRun">>,
  2781. HelpText<"(For new pass manager) 'per-pass': one report for each pass; "
  2782. "'per-pass-run': one report for each pass invocation">;
  2783. def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>,
  2784. HelpText<"Turn on time profiler. Generates JSON file based on output filename.">,
  2785. DocBrief<[{
  2786. Turn on time profiler. Generates JSON file based on output filename. Results
  2787. can be analyzed with chrome://tracing or `Speedscope App
  2788. <https://www.speedscope.app>`_ for flamegraph visualization.}]>,
  2789. Flags<[CC1Option, CoreOption]>,
  2790. MarshallingInfoFlag<FrontendOpts<"TimeTrace">>;
  2791. def ftime_trace_granularity_EQ : Joined<["-"], "ftime-trace-granularity=">, Group<f_Group>,
  2792. HelpText<"Minimum time granularity (in microseconds) traced by time profiler">,
  2793. Flags<[CC1Option, CoreOption]>,
  2794. MarshallingInfoInt<FrontendOpts<"TimeTraceGranularity">, "500u">;
  2795. def ftime_trace_EQ : Joined<["-"], "ftime-trace=">, Group<f_Group>,
  2796. HelpText<"Similar to -ftime-trace. Specify the JSON file or a directory which will contain the JSON file">,
  2797. Flags<[CC1Option, CoreOption]>,
  2798. MarshallingInfoString<FrontendOpts<"TimeTracePath">>;
  2799. def fproc_stat_report : Joined<["-"], "fproc-stat-report">, Group<f_Group>,
  2800. HelpText<"Print subprocess statistics">;
  2801. def fproc_stat_report_EQ : Joined<["-"], "fproc-stat-report=">, Group<f_Group>,
  2802. HelpText<"Save subprocess statistics to the given file">;
  2803. def ftlsmodel_EQ : Joined<["-"], "ftls-model=">, Group<f_Group>, Flags<[CC1Option]>,
  2804. Values<"global-dynamic,local-dynamic,initial-exec,local-exec">,
  2805. NormalizedValuesScope<"CodeGenOptions">,
  2806. NormalizedValues<["GeneralDynamicTLSModel", "LocalDynamicTLSModel", "InitialExecTLSModel", "LocalExecTLSModel"]>,
  2807. MarshallingInfoEnum<CodeGenOpts<"DefaultTLSModel">, "GeneralDynamicTLSModel">;
  2808. def ftrapv : Flag<["-"], "ftrapv">, Group<f_Group>, Flags<[CC1Option]>,
  2809. HelpText<"Trap on integer overflow">;
  2810. def ftrapv_handler_EQ : Joined<["-"], "ftrapv-handler=">, Group<f_Group>,
  2811. MetaVarName<"<function name>">,
  2812. HelpText<"Specify the function to be called on overflow">;
  2813. def ftrapv_handler : Separate<["-"], "ftrapv-handler">, Group<f_Group>, Flags<[CC1Option]>;
  2814. def ftrap_function_EQ : Joined<["-"], "ftrap-function=">, Group<f_Group>, Flags<[CC1Option]>,
  2815. HelpText<"Issue call to specified function rather than a trap instruction">,
  2816. MarshallingInfoString<CodeGenOpts<"TrapFuncName">>;
  2817. def funroll_loops : Flag<["-"], "funroll-loops">, Group<f_Group>,
  2818. HelpText<"Turn on loop unroller">, Flags<[CC1Option]>;
  2819. def fno_unroll_loops : Flag<["-"], "fno-unroll-loops">, Group<f_Group>,
  2820. HelpText<"Turn off loop unroller">, Flags<[CC1Option]>;
  2821. defm reroll_loops : BoolFOption<"reroll-loops",
  2822. CodeGenOpts<"RerollLoops">, DefaultFalse,
  2823. PosFlag<SetTrue, [CC1Option], "Turn on loop reroller">, NegFlag<SetFalse>>;
  2824. def ffinite_loops: Flag<["-"], "ffinite-loops">, Group<f_Group>,
  2825. HelpText<"Assume all loops are finite.">, Flags<[CC1Option]>;
  2826. def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group<f_Group>,
  2827. HelpText<"Do not assume that any loop is finite.">, Flags<[CC1Option]>;
  2828. def ftrigraphs : Flag<["-"], "ftrigraphs">, Group<f_Group>,
  2829. HelpText<"Process trigraph sequences">, Flags<[CC1Option]>;
  2830. def fno_trigraphs : Flag<["-"], "fno-trigraphs">, Group<f_Group>,
  2831. HelpText<"Do not process trigraph sequences">, Flags<[CC1Option]>;
  2832. def funsigned_bitfields : Flag<["-"], "funsigned-bitfields">, Group<f_Group>;
  2833. def funsigned_char : Flag<["-"], "funsigned-char">, Group<f_Group>;
  2834. def fno_unsigned_char : Flag<["-"], "fno-unsigned-char">;
  2835. def funwind_tables : Flag<["-"], "funwind-tables">, Group<f_Group>;
  2836. defm register_global_dtors_with_atexit : BoolFOption<"register-global-dtors-with-atexit",
  2837. CodeGenOpts<"RegisterGlobalDtorsWithAtExit">, DefaultFalse,
  2838. PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
  2839. BothFlags<[], " atexit or __cxa_atexit to register global destructors">>;
  2840. defm use_init_array : BoolFOption<"use-init-array",
  2841. CodeGenOpts<"UseInitArray">, DefaultTrue,
  2842. NegFlag<SetFalse, [CC1Option], "Use .ctors/.dtors instead of .init_array/.fini_array">,
  2843. PosFlag<SetTrue>>;
  2844. def fno_var_tracking : Flag<["-"], "fno-var-tracking">, Group<clang_ignored_f_Group>;
  2845. def fverbose_asm : Flag<["-"], "fverbose-asm">, Group<f_Group>,
  2846. HelpText<"Generate verbose assembly output">;
  2847. def dA : Flag<["-"], "dA">, Alias<fverbose_asm>;
  2848. defm visibility_from_dllstorageclass : BoolFOption<"visibility-from-dllstorageclass",
  2849. LangOpts<"VisibilityFromDLLStorageClass">, DefaultFalse,
  2850. PosFlag<SetTrue, [CC1Option], "Set the visibility of symbols in the generated code from their DLL storage class">,
  2851. NegFlag<SetFalse>>;
  2852. def fvisibility_dllexport_EQ : Joined<["-"], "fvisibility-dllexport=">, Group<f_Group>, Flags<[CC1Option]>,
  2853. HelpText<"The visibility for dllexport definitions [-fvisibility-from-dllstorageclass]">,
  2854. MarshallingInfoVisibility<LangOpts<"DLLExportVisibility">, "DefaultVisibility">,
  2855. ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
  2856. def fvisibility_nodllstorageclass_EQ : Joined<["-"], "fvisibility-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>,
  2857. HelpText<"The visibility for definitions without an explicit DLL export class [-fvisibility-from-dllstorageclass]">,
  2858. MarshallingInfoVisibility<LangOpts<"NoDLLStorageClassVisibility">, "HiddenVisibility">,
  2859. ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
  2860. def fvisibility_externs_dllimport_EQ : Joined<["-"], "fvisibility-externs-dllimport=">, Group<f_Group>, Flags<[CC1Option]>,
  2861. HelpText<"The visibility for dllimport external declarations [-fvisibility-from-dllstorageclass]">,
  2862. MarshallingInfoVisibility<LangOpts<"ExternDeclDLLImportVisibility">, "DefaultVisibility">,
  2863. ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
  2864. def fvisibility_externs_nodllstorageclass_EQ : Joined<["-"], "fvisibility-externs-nodllstorageclass=">, Group<f_Group>, Flags<[CC1Option]>,
  2865. HelpText<"The visibility for external declarations without an explicit DLL dllstorageclass [-fvisibility-from-dllstorageclass]">,
  2866. MarshallingInfoVisibility<LangOpts<"ExternDeclNoDLLStorageClassVisibility">, "HiddenVisibility">,
  2867. ShouldParseIf<fvisibility_from_dllstorageclass.KeyPath>;
  2868. def fvisibility_EQ : Joined<["-"], "fvisibility=">, Group<f_Group>, Flags<[CC1Option]>,
  2869. HelpText<"Set the default symbol visibility for all global definitions">,
  2870. MarshallingInfoVisibility<LangOpts<"ValueVisibilityMode">, "DefaultVisibility">;
  2871. defm visibility_inlines_hidden : BoolFOption<"visibility-inlines-hidden",
  2872. LangOpts<"InlineVisibilityHidden">, DefaultFalse,
  2873. PosFlag<SetTrue, [CC1Option], "Give inline C++ member functions hidden visibility by default">,
  2874. NegFlag<SetFalse>>;
  2875. defm visibility_inlines_hidden_static_local_var : BoolFOption<"visibility-inlines-hidden-static-local-var",
  2876. LangOpts<"VisibilityInlinesHiddenStaticLocalVar">, DefaultFalse,
  2877. PosFlag<SetTrue, [CC1Option], "When -fvisibility-inlines-hidden is enabled, static variables in"
  2878. " inline C++ member functions will also be given hidden visibility by default">,
  2879. NegFlag<SetFalse, [], "Disables -fvisibility-inlines-hidden-static-local-var"
  2880. " (this is the default on non-darwin targets)">, BothFlags<[CC1Option]>>;
  2881. def fvisibility_ms_compat : Flag<["-"], "fvisibility-ms-compat">, Group<f_Group>,
  2882. HelpText<"Give global types 'default' visibility and global functions and "
  2883. "variables 'hidden' visibility by default">;
  2884. def fvisibility_global_new_delete_hidden : Flag<["-"], "fvisibility-global-new-delete-hidden">, Group<f_Group>,
  2885. HelpText<"Give global C++ operator new and delete declarations hidden visibility">, Flags<[CC1Option]>,
  2886. MarshallingInfoFlag<LangOpts<"GlobalAllocationFunctionVisibilityHidden">>;
  2887. def mdefault_visibility_export_mapping_EQ : Joined<["-"], "mdefault-visibility-export-mapping=">,
  2888. Values<"none,explicit,all">,
  2889. NormalizedValuesScope<"LangOptions::DefaultVisiblityExportMapping">,
  2890. NormalizedValues<["None", "Explicit", "All"]>,
  2891. HelpText<"Mapping between default visibility and export">,
  2892. Group<m_Group>, Flags<[CC1Option]>,
  2893. MarshallingInfoEnum<LangOpts<"DefaultVisibilityExportMapping">,"None">;
  2894. defm new_infallible : BoolFOption<"new-infallible",
  2895. LangOpts<"NewInfallible">, DefaultFalse,
  2896. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
  2897. BothFlags<[CC1Option], " treating throwing global C++ operator new as always returning valid memory "
  2898. "(annotates with __attribute__((returns_nonnull)) and throw()). This is detectable in source.">>;
  2899. defm whole_program_vtables : BoolFOption<"whole-program-vtables",
  2900. CodeGenOpts<"WholeProgramVTables">, DefaultFalse,
  2901. PosFlag<SetTrue, [CC1Option], "Enables whole-program vtable optimization. Requires -flto">,
  2902. NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
  2903. defm split_lto_unit : BoolFOption<"split-lto-unit",
  2904. CodeGenOpts<"EnableSplitLTOUnit">, DefaultFalse,
  2905. PosFlag<SetTrue, [CC1Option], "Enables splitting of the LTO unit">,
  2906. NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
  2907. defm force_emit_vtables : BoolFOption<"force-emit-vtables",
  2908. CodeGenOpts<"ForceEmitVTables">, DefaultFalse,
  2909. PosFlag<SetTrue, [CC1Option], "Emits more virtual tables to improve devirtualization">,
  2910. NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
  2911. defm virtual_function_elimination : BoolFOption<"virtual-function-elimination",
  2912. CodeGenOpts<"VirtualFunctionElimination">, DefaultFalse,
  2913. PosFlag<SetTrue, [CC1Option], "Enables dead virtual function elimination optimization. Requires -flto=full">,
  2914. NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
  2915. def fwrapv : Flag<["-"], "fwrapv">, Group<f_Group>, Flags<[CC1Option]>,
  2916. HelpText<"Treat signed integer overflow as two's complement">;
  2917. def fwritable_strings : Flag<["-"], "fwritable-strings">, Group<f_Group>, Flags<[CC1Option]>,
  2918. HelpText<"Store string literals as writable data">,
  2919. MarshallingInfoFlag<LangOpts<"WritableStrings">>;
  2920. defm zero_initialized_in_bss : BoolFOption<"zero-initialized-in-bss",
  2921. CodeGenOpts<"NoZeroInitializedInBSS">, DefaultFalse,
  2922. NegFlag<SetTrue, [CC1Option], "Don't place zero initialized data in BSS">,
  2923. PosFlag<SetFalse>>;
  2924. defm function_sections : BoolFOption<"function-sections",
  2925. CodeGenOpts<"FunctionSections">, DefaultFalse,
  2926. PosFlag<SetTrue, [CC1Option], "Place each function in its own section">,
  2927. NegFlag<SetFalse>>;
  2928. def fbasic_block_sections_EQ : Joined<["-"], "fbasic-block-sections=">, Group<f_Group>,
  2929. Flags<[CC1Option, CC1AsOption]>,
  2930. HelpText<"Place each function's basic blocks in unique sections (ELF Only)">,
  2931. DocBrief<[{Generate labels for each basic block or place each basic block or a subset of basic blocks in its own section.}]>,
  2932. Values<"all,labels,none,list=">,
  2933. MarshallingInfoString<CodeGenOpts<"BBSections">, [{"none"}]>;
  2934. defm data_sections : BoolFOption<"data-sections",
  2935. CodeGenOpts<"DataSections">, DefaultFalse,
  2936. PosFlag<SetTrue, [CC1Option], "Place each data in its own section">, NegFlag<SetFalse>>;
  2937. defm stack_size_section : BoolFOption<"stack-size-section",
  2938. CodeGenOpts<"StackSizeSection">, DefaultFalse,
  2939. PosFlag<SetTrue, [CC1Option], "Emit section containing metadata on function stack sizes">,
  2940. NegFlag<SetFalse>>;
  2941. def fstack_usage : Flag<["-"], "fstack-usage">, Group<f_Group>,
  2942. HelpText<"Emit .su file containing information on function stack sizes">;
  2943. def stack_usage_file : Separate<["-"], "stack-usage-file">,
  2944. Flags<[CC1Option, NoDriverOption]>,
  2945. HelpText<"Filename (or -) to write stack usage output to">,
  2946. MarshallingInfoString<CodeGenOpts<"StackUsageOutput">>;
  2947. defm unique_basic_block_section_names : BoolFOption<"unique-basic-block-section-names",
  2948. CodeGenOpts<"UniqueBasicBlockSectionNames">, DefaultFalse,
  2949. PosFlag<SetTrue, [CC1Option], "Use unique names for basic block sections (ELF Only)">,
  2950. NegFlag<SetFalse>>;
  2951. defm unique_internal_linkage_names : BoolFOption<"unique-internal-linkage-names",
  2952. CodeGenOpts<"UniqueInternalLinkageNames">, DefaultFalse,
  2953. PosFlag<SetTrue, [CC1Option], "Uniqueify Internal Linkage Symbol Names by appending"
  2954. " the MD5 hash of the module path">,
  2955. NegFlag<SetFalse>>;
  2956. defm unique_section_names : BoolFOption<"unique-section-names",
  2957. CodeGenOpts<"UniqueSectionNames">, DefaultTrue,
  2958. NegFlag<SetFalse, [CC1Option], "Don't use unique names for text and data sections">,
  2959. PosFlag<SetTrue>>;
  2960. defm split_machine_functions: BoolFOption<"split-machine-functions",
  2961. CodeGenOpts<"SplitMachineFunctions">, DefaultFalse,
  2962. PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
  2963. BothFlags<[], " late function splitting using profile information (x86 ELF)">>;
  2964. defm strict_return : BoolFOption<"strict-return",
  2965. CodeGenOpts<"StrictReturn">, DefaultTrue,
  2966. NegFlag<SetFalse, [CC1Option], "Don't treat control flow paths that fall off the end"
  2967. " of a non-void function as unreachable">,
  2968. PosFlag<SetTrue>>;
  2969. def fenable_matrix : Flag<["-"], "fenable-matrix">, Group<f_Group>,
  2970. Flags<[CC1Option]>,
  2971. HelpText<"Enable matrix data type and related builtin functions">,
  2972. MarshallingInfoFlag<LangOpts<"MatrixTypes">>;
  2973. def fzero_call_used_regs_EQ
  2974. : Joined<["-"], "fzero-call-used-regs=">, Group<f_Group>, Flags<[CC1Option]>,
  2975. HelpText<"Clear call-used registers upon function return (AArch64/x86 only)">,
  2976. Values<"skip,used-gpr-arg,used-gpr,used-arg,used,all-gpr-arg,all-gpr,all-arg,all">,
  2977. NormalizedValues<["Skip", "UsedGPRArg", "UsedGPR", "UsedArg", "Used",
  2978. "AllGPRArg", "AllGPR", "AllArg", "All"]>,
  2979. NormalizedValuesScope<"llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind">,
  2980. MarshallingInfoEnum<CodeGenOpts<"ZeroCallUsedRegs">, "Skip">;
  2981. def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>,
  2982. HelpText<"Place debug types in their own section (ELF Only)">;
  2983. def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>;
  2984. defm debug_ranges_base_address : BoolFOption<"debug-ranges-base-address",
  2985. CodeGenOpts<"DebugRangesBaseAddress">, DefaultFalse,
  2986. PosFlag<SetTrue, [CC1Option], "Use DWARF base address selection entries in .debug_ranges">,
  2987. NegFlag<SetFalse>>;
  2988. defm split_dwarf_inlining : BoolFOption<"split-dwarf-inlining",
  2989. CodeGenOpts<"SplitDwarfInlining">, DefaultFalse,
  2990. NegFlag<SetFalse, []>,
  2991. PosFlag<SetTrue, [CC1Option], "Provide minimal debug info in the object/executable"
  2992. " to facilitate online symbolication/stack traces in the absence of"
  2993. " .dwo/.dwp files when using Split DWARF">>;
  2994. def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group<f_Group>,
  2995. HelpText<"Default DWARF version to use, if a -g option caused DWARF debug info to be produced">;
  2996. def fdebug_prefix_map_EQ
  2997. : Joined<["-"], "fdebug-prefix-map=">, Group<f_Group>,
  2998. Flags<[CC1Option,CC1AsOption]>,
  2999. HelpText<"remap file source paths in debug info">;
  3000. def fcoverage_prefix_map_EQ
  3001. : Joined<["-"], "fcoverage-prefix-map=">, Group<f_Group>,
  3002. Flags<[CC1Option]>,
  3003. HelpText<"remap file source paths in coverage mapping">;
  3004. def ffile_prefix_map_EQ
  3005. : Joined<["-"], "ffile-prefix-map=">, Group<f_Group>,
  3006. HelpText<"remap file source paths in debug info, predefined preprocessor "
  3007. "macros and __builtin_FILE(). Implies -ffile-reproducible.">;
  3008. def fmacro_prefix_map_EQ
  3009. : Joined<["-"], "fmacro-prefix-map=">, Group<f_Group>, Flags<[CC1Option]>,
  3010. HelpText<"remap file source paths in predefined preprocessor macros and "
  3011. "__builtin_FILE(). Implies -ffile-reproducible.">;
  3012. defm force_dwarf_frame : BoolFOption<"force-dwarf-frame",
  3013. CodeGenOpts<"ForceDwarfFrameSection">, DefaultFalse,
  3014. PosFlag<SetTrue, [CC1Option], "Always emit a debug frame section">, NegFlag<SetFalse>>;
  3015. def femit_dwarf_unwind_EQ : Joined<["-"], "femit-dwarf-unwind=">,
  3016. Group<f_Group>, Flags<[CC1Option, CC1AsOption]>,
  3017. HelpText<"When to emit DWARF unwind (EH frame) info">,
  3018. Values<"always,no-compact-unwind,default">,
  3019. NormalizedValues<["Always", "NoCompactUnwind", "Default"]>,
  3020. NormalizedValuesScope<"llvm::EmitDwarfUnwindType">,
  3021. MarshallingInfoEnum<CodeGenOpts<"EmitDwarfUnwind">, "Default">;
  3022. def g_Flag : Flag<["-"], "g">, Group<g_Group>,
  3023. HelpText<"Generate source-level debug information">;
  3024. def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<gN_Group>,
  3025. Flags<[CoreOption]>, HelpText<"Emit debug line number tables only">;
  3026. def gline_directives_only : Flag<["-"], "gline-directives-only">, Group<gN_Group>,
  3027. Flags<[CoreOption]>, HelpText<"Emit debug line info directives only">;
  3028. def gmlt : Flag<["-"], "gmlt">, Alias<gline_tables_only>;
  3029. def g0 : Flag<["-"], "g0">, Group<gN_Group>;
  3030. def g1 : Flag<["-"], "g1">, Group<gN_Group>, Alias<gline_tables_only>;
  3031. def g2 : Flag<["-"], "g2">, Group<gN_Group>;
  3032. def g3 : Flag<["-"], "g3">, Group<gN_Group>;
  3033. def ggdb : Flag<["-"], "ggdb">, Group<gTune_Group>;
  3034. def ggdb0 : Flag<["-"], "ggdb0">, Group<ggdbN_Group>;
  3035. def ggdb1 : Flag<["-"], "ggdb1">, Group<ggdbN_Group>;
  3036. def ggdb2 : Flag<["-"], "ggdb2">, Group<ggdbN_Group>;
  3037. def ggdb3 : Flag<["-"], "ggdb3">, Group<ggdbN_Group>;
  3038. def glldb : Flag<["-"], "glldb">, Group<gTune_Group>;
  3039. def gsce : Flag<["-"], "gsce">, Group<gTune_Group>;
  3040. def gdbx : Flag<["-"], "gdbx">, Group<gTune_Group>;
  3041. // Equivalent to our default dwarf version. Forces usual dwarf emission when
  3042. // CodeView is enabled.
  3043. def gdwarf : Flag<["-"], "gdwarf">, Group<g_Group>, Flags<[CoreOption]>,
  3044. HelpText<"Generate source-level debug information with the default dwarf version">;
  3045. def gdwarf_2 : Flag<["-"], "gdwarf-2">, Group<g_Group>,
  3046. HelpText<"Generate source-level debug information with dwarf version 2">;
  3047. def gdwarf_3 : Flag<["-"], "gdwarf-3">, Group<g_Group>,
  3048. HelpText<"Generate source-level debug information with dwarf version 3">;
  3049. def gdwarf_4 : Flag<["-"], "gdwarf-4">, Group<g_Group>,
  3050. HelpText<"Generate source-level debug information with dwarf version 4">;
  3051. def gdwarf_5 : Flag<["-"], "gdwarf-5">, Group<g_Group>,
  3052. HelpText<"Generate source-level debug information with dwarf version 5">;
  3053. def gdwarf64 : Flag<["-"], "gdwarf64">, Group<g_Group>,
  3054. Flags<[CC1Option, CC1AsOption]>,
  3055. HelpText<"Enables DWARF64 format for ELF binaries, if debug information emission is enabled.">,
  3056. MarshallingInfoFlag<CodeGenOpts<"Dwarf64">>;
  3057. def gdwarf32 : Flag<["-"], "gdwarf32">, Group<g_Group>,
  3058. Flags<[CC1Option, CC1AsOption]>,
  3059. HelpText<"Enables DWARF32 format for ELF binaries, if debug information emission is enabled.">;
  3060. def gcodeview : Flag<["-"], "gcodeview">,
  3061. HelpText<"Generate CodeView debug information">,
  3062. Flags<[CC1Option, CC1AsOption, CoreOption]>,
  3063. MarshallingInfoFlag<CodeGenOpts<"EmitCodeView">>;
  3064. defm codeview_ghash : BoolOption<"g", "codeview-ghash",
  3065. CodeGenOpts<"CodeViewGHash">, DefaultFalse,
  3066. PosFlag<SetTrue, [CC1Option], "Emit type record hashes in a .debug$H section">,
  3067. NegFlag<SetFalse>, BothFlags<[CoreOption]>>;
  3068. defm codeview_command_line : BoolOption<"g", "codeview-command-line",
  3069. CodeGenOpts<"CodeViewCommandLine">, DefaultTrue,
  3070. PosFlag<SetTrue, [], "Emit compiler path and command line into CodeView debug information">,
  3071. NegFlag<SetFalse, [], "Don't emit compiler path and command line into CodeView debug information">,
  3072. BothFlags<[CoreOption, CC1Option]>>;
  3073. defm inline_line_tables : BoolGOption<"inline-line-tables",
  3074. CodeGenOpts<"NoInlineLineTables">, DefaultFalse,
  3075. NegFlag<SetTrue, [CC1Option], "Don't emit inline line tables.">,
  3076. PosFlag<SetFalse>, BothFlags<[CoreOption]>>;
  3077. def gfull : Flag<["-"], "gfull">, Group<g_Group>;
  3078. def gused : Flag<["-"], "gused">, Group<g_Group>;
  3079. def gstabs : Joined<["-"], "gstabs">, Group<g_Group>, Flags<[Unsupported]>;
  3080. def gcoff : Joined<["-"], "gcoff">, Group<g_Group>, Flags<[Unsupported]>;
  3081. def gxcoff : Joined<["-"], "gxcoff">, Group<g_Group>, Flags<[Unsupported]>;
  3082. def gvms : Joined<["-"], "gvms">, Group<g_Group>, Flags<[Unsupported]>;
  3083. def gtoggle : Flag<["-"], "gtoggle">, Group<g_flags_Group>, Flags<[Unsupported]>;
  3084. def grecord_command_line : Flag<["-"], "grecord-command-line">,
  3085. Group<g_flags_Group>;
  3086. def gno_record_command_line : Flag<["-"], "gno-record-command-line">,
  3087. Group<g_flags_Group>;
  3088. def : Flag<["-"], "grecord-gcc-switches">, Alias<grecord_command_line>;
  3089. def : Flag<["-"], "gno-record-gcc-switches">, Alias<gno_record_command_line>;
  3090. defm strict_dwarf : BoolOption<"g", "strict-dwarf",
  3091. CodeGenOpts<"DebugStrictDwarf">, DefaultFalse,
  3092. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>,
  3093. Group<g_flags_Group>;
  3094. defm column_info : BoolOption<"g", "column-info",
  3095. CodeGenOpts<"DebugColumnInfo">, DefaultTrue,
  3096. NegFlag<SetFalse, [CC1Option]>, PosFlag<SetTrue>, BothFlags<[CoreOption]>>,
  3097. Group<g_flags_Group>;
  3098. def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;
  3099. def gsplit_dwarf_EQ : Joined<["-"], "gsplit-dwarf=">, Group<g_flags_Group>,
  3100. HelpText<"Set DWARF fission mode">,
  3101. Values<"split,single">;
  3102. def gno_split_dwarf : Flag<["-"], "gno-split-dwarf">, Group<g_flags_Group>;
  3103. def gsimple_template_names : Flag<["-"], "gsimple-template-names">, Group<g_flags_Group>;
  3104. def gsimple_template_names_EQ
  3105. : Joined<["-"], "gsimple-template-names=">,
  3106. HelpText<"Use simple template names in DWARF, or include the full "
  3107. "template name with a modified prefix for validation">,
  3108. Values<"simple,mangled">, Flags<[CC1Option, NoDriverOption]>;
  3109. def gsrc_hash_EQ : Joined<["-"], "gsrc-hash=">,
  3110. Group<g_flags_Group>, Flags<[CC1Option, NoDriverOption]>,
  3111. Values<"md5,sha1,sha256">,
  3112. NormalizedValues<["DSH_MD5", "DSH_SHA1", "DSH_SHA256"]>,
  3113. NormalizedValuesScope<"CodeGenOptions">,
  3114. MarshallingInfoEnum<CodeGenOpts<"DebugSrcHash">, "DSH_MD5">;
  3115. def gno_simple_template_names : Flag<["-"], "gno-simple-template-names">,
  3116. Group<g_flags_Group>;
  3117. def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
  3118. def gno_gnu_pubnames : Flag<["-"], "gno-gnu-pubnames">, Group<g_flags_Group>;
  3119. def gpubnames : Flag<["-"], "gpubnames">, Group<g_flags_Group>, Flags<[CC1Option]>;
  3120. def gno_pubnames : Flag<["-"], "gno-pubnames">, Group<g_flags_Group>;
  3121. def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
  3122. def gmodules : Flag <["-"], "gmodules">, Group<gN_Group>,
  3123. HelpText<"Generate debug info with external references to clang modules"
  3124. " or precompiled headers">;
  3125. def gno_modules : Flag <["-"], "gno-modules">, Group<g_flags_Group>;
  3126. def gz_EQ : Joined<["-"], "gz=">, Group<g_flags_Group>,
  3127. HelpText<"DWARF debug sections compression type">;
  3128. def gz : Flag<["-"], "gz">, Alias<gz_EQ>, AliasArgs<["zlib"]>, Group<g_flags_Group>;
  3129. def gembed_source : Flag<["-"], "gembed-source">, Group<g_flags_Group>, Flags<[CC1Option]>,
  3130. HelpText<"Embed source text in DWARF debug sections">,
  3131. MarshallingInfoFlag<CodeGenOpts<"EmbedSource">>;
  3132. def gno_embed_source : Flag<["-"], "gno-embed-source">, Group<g_flags_Group>,
  3133. Flags<[NoXarchOption]>,
  3134. HelpText<"Restore the default behavior of not embedding source text in DWARF debug sections">;
  3135. def headerpad__max__install__names : Joined<["-"], "headerpad_max_install_names">;
  3136. def help : Flag<["-", "--"], "help">, Flags<[CC1Option,CC1AsOption, FC1Option,
  3137. FlangOption]>, HelpText<"Display available options">,
  3138. MarshallingInfoFlag<FrontendOpts<"ShowHelp">>;
  3139. def ibuiltininc : Flag<["-"], "ibuiltininc">,
  3140. HelpText<"Enable builtin #include directories even when -nostdinc is used "
  3141. "before or after -ibuiltininc. "
  3142. "Using -nobuiltininc after the option disables it">;
  3143. def index_header_map : Flag<["-"], "index-header-map">, Flags<[CC1Option]>,
  3144. HelpText<"Make the next included directory (-I or -F) an indexer header map">;
  3145. def idirafter : JoinedOrSeparate<["-"], "idirafter">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3146. HelpText<"Add directory to AFTER include search path">;
  3147. def iframework : JoinedOrSeparate<["-"], "iframework">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3148. HelpText<"Add directory to SYSTEM framework search path">;
  3149. def iframeworkwithsysroot : JoinedOrSeparate<["-"], "iframeworkwithsysroot">,
  3150. Group<clang_i_Group>,
  3151. HelpText<"Add directory to SYSTEM framework search path, "
  3152. "absolute paths are relative to -isysroot">,
  3153. MetaVarName<"<directory>">, Flags<[CC1Option]>;
  3154. def imacros : JoinedOrSeparate<["-", "--"], "imacros">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3155. HelpText<"Include macros from file before parsing">, MetaVarName<"<file>">,
  3156. MarshallingInfoStringVector<PreprocessorOpts<"MacroIncludes">>;
  3157. def image__base : Separate<["-"], "image_base">;
  3158. def include_ : JoinedOrSeparate<["-", "--"], "include">, Group<clang_i_Group>, EnumName<"include">,
  3159. MetaVarName<"<file>">, HelpText<"Include file before parsing">, Flags<[CC1Option]>;
  3160. def include_pch : Separate<["-"], "include-pch">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3161. HelpText<"Include precompiled header file">, MetaVarName<"<file>">,
  3162. MarshallingInfoString<PreprocessorOpts<"ImplicitPCHInclude">>;
  3163. def relocatable_pch : Flag<["-", "--"], "relocatable-pch">, Flags<[CC1Option]>,
  3164. HelpText<"Whether to build a relocatable precompiled header">,
  3165. MarshallingInfoFlag<FrontendOpts<"RelocatablePCH">>;
  3166. def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Option]>,
  3167. HelpText<"Load and verify that a pre-compiled header file is not stale">;
  3168. def init : Separate<["-"], "init">;
  3169. def install__name : Separate<["-"], "install_name">;
  3170. def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3171. HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">;
  3172. def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3173. HelpText<"Add directory to QUOTE include search path">, MetaVarName<"<directory>">;
  3174. def isysroot : JoinedOrSeparate<["-"], "isysroot">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3175. HelpText<"Set the system root directory (usually /)">, MetaVarName<"<dir>">,
  3176. MarshallingInfoString<HeaderSearchOpts<"Sysroot">, [{"/"}]>;
  3177. def isystem : JoinedOrSeparate<["-"], "isystem">, Group<clang_i_Group>,
  3178. Flags<[CC1Option]>,
  3179. HelpText<"Add directory to SYSTEM include search path">, MetaVarName<"<directory>">;
  3180. def isystem_after : JoinedOrSeparate<["-"], "isystem-after">,
  3181. Group<clang_i_Group>, Flags<[NoXarchOption]>, MetaVarName<"<directory>">,
  3182. HelpText<"Add directory to end of the SYSTEM include search path">;
  3183. def iwithprefixbefore : JoinedOrSeparate<["-"], "iwithprefixbefore">, Group<clang_i_Group>,
  3184. HelpText<"Set directory to include search path with prefix">, MetaVarName<"<dir>">,
  3185. Flags<[CC1Option]>;
  3186. def iwithprefix : JoinedOrSeparate<["-"], "iwithprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3187. HelpText<"Set directory to SYSTEM include search path with prefix">, MetaVarName<"<dir>">;
  3188. def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>,
  3189. HelpText<"Add directory to SYSTEM include search path, "
  3190. "absolute paths are relative to -isysroot">, MetaVarName<"<directory>">,
  3191. Flags<[CC1Option]>;
  3192. def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>,
  3193. HelpText<"Overlay the virtual filesystem described by file over the real file system">;
  3194. def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;
  3195. def keep__private__externs : Flag<["-"], "keep_private_externs">;
  3196. def l : JoinedOrSeparate<["-"], "l">, Flags<[LinkerInput, RenderJoined]>,
  3197. Group<Link_Group>;
  3198. def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>;
  3199. def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>;
  3200. def mlittle_endian : Flag<["-"], "mlittle-endian">, Flags<[NoXarchOption]>;
  3201. def EL : Flag<["-"], "EL">, Alias<mlittle_endian>;
  3202. def mbig_endian : Flag<["-"], "mbig-endian">, Flags<[NoXarchOption]>;
  3203. def EB : Flag<["-"], "EB">, Alias<mbig_endian>;
  3204. def m16 : Flag<["-"], "m16">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
  3205. def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
  3206. def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[NoXarchOption,CC1Option]>,
  3207. HelpText<"Enable hexagon-qdsp6 backward compatibility">,
  3208. MarshallingInfoFlag<LangOpts<"HexagonQdsp6Compat">>;
  3209. def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
  3210. def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
  3211. def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>;
  3212. def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>,
  3213. HelpText<"Use Intel MCU ABI">;
  3214. def mno_iamcu : Flag<["-"], "mno-iamcu">, Group<m_Group>, Flags<[NoXarchOption, CoreOption]>;
  3215. def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>;
  3216. def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>;
  3217. def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>;
  3218. def malign_branch_EQ : CommaJoined<["-"], "malign-branch=">, Group<m_Group>, Flags<[NoXarchOption]>,
  3219. HelpText<"Specify types of branches to align">;
  3220. def malign_branch_boundary_EQ : Joined<["-"], "malign-branch-boundary=">, Group<m_Group>, Flags<[NoXarchOption]>,
  3221. HelpText<"Specify the boundary's size to align branches">;
  3222. def mpad_max_prefix_size_EQ : Joined<["-"], "mpad-max-prefix-size=">, Group<m_Group>, Flags<[NoXarchOption]>,
  3223. HelpText<"Specify maximum number of prefixes to use for padding">;
  3224. def mbranches_within_32B_boundaries : Flag<["-"], "mbranches-within-32B-boundaries">, Flags<[NoXarchOption]>, Group<m_Group>,
  3225. HelpText<"Align selected branches (fused, jcc, jmp) within 32-byte boundary">;
  3226. def mfancy_math_387 : Flag<["-"], "mfancy-math-387">, Group<clang_ignored_m_Group>;
  3227. def mlong_calls : Flag<["-"], "mlong-calls">, Group<m_Group>,
  3228. HelpText<"Generate branches with extended addressability, usually via indirect jumps.">;
  3229. def mdouble_EQ : Joined<["-"], "mdouble=">, Group<m_Group>,
  3230. MetaVarName<"<n">, Values<"32,64">, Flags<[CC1Option]>,
  3231. HelpText<"Force double to be <n> bits">,
  3232. MarshallingInfoInt<LangOpts<"DoubleSize">, "0">;
  3233. def LongDouble_Group : OptionGroup<"<LongDouble group>">, Group<m_Group>,
  3234. DocName<"Long double flags">,
  3235. DocBrief<[{Selects the long double implementation}]>;
  3236. def mlong_double_64 : Flag<["-"], "mlong-double-64">, Group<LongDouble_Group>, Flags<[CC1Option]>,
  3237. HelpText<"Force long double to be 64 bits">;
  3238. def mlong_double_80 : Flag<["-"], "mlong-double-80">, Group<LongDouble_Group>, Flags<[CC1Option]>,
  3239. HelpText<"Force long double to be 80 bits, padded to 128 bits for storage">;
  3240. def mlong_double_128 : Flag<["-"], "mlong-double-128">, Group<LongDouble_Group>, Flags<[CC1Option]>,
  3241. HelpText<"Force long double to be 128 bits">;
  3242. def mno_long_calls : Flag<["-"], "mno-long-calls">, Group<m_Group>,
  3243. HelpText<"Restore the default behaviour of not generating long calls">;
  3244. def mexecute_only : Flag<["-"], "mexecute-only">, Group<m_arm_Features_Group>,
  3245. HelpText<"Disallow generation of data access to code sections (ARM only)">;
  3246. def mno_execute_only : Flag<["-"], "mno-execute-only">, Group<m_arm_Features_Group>,
  3247. HelpText<"Allow generation of data access to code sections (ARM only)">;
  3248. def mtp_mode_EQ : Joined<["-"], "mtp=">, Group<m_arm_Features_Group>, Values<"soft,cp15,el0,el1,el2,el3">,
  3249. HelpText<"Thread pointer access method (AArch32/AArch64 only)">;
  3250. def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility
  3251. def mno_pure_code : Flag<["-"], "mno-pure-code">, Alias<mno_execute_only>;
  3252. def mtvos_version_min_EQ : Joined<["-"], "mtvos-version-min=">, Group<m_Group>;
  3253. def mappletvos_version_min_EQ : Joined<["-"], "mappletvos-version-min=">, Alias<mtvos_version_min_EQ>;
  3254. def mtvos_simulator_version_min_EQ : Joined<["-"], "mtvos-simulator-version-min=">;
  3255. def mappletvsimulator_version_min_EQ : Joined<["-"], "mappletvsimulator-version-min=">, Alias<mtvos_simulator_version_min_EQ>;
  3256. def mwatchos_version_min_EQ : Joined<["-"], "mwatchos-version-min=">, Group<m_Group>;
  3257. def mwatchos_simulator_version_min_EQ : Joined<["-"], "mwatchos-simulator-version-min=">;
  3258. def mwatchsimulator_version_min_EQ : Joined<["-"], "mwatchsimulator-version-min=">, Alias<mwatchos_simulator_version_min_EQ>;
  3259. def march_EQ : Joined<["-"], "march=">, Group<m_Group>, Flags<[CoreOption]>;
  3260. def masm_EQ : Joined<["-"], "masm=">, Group<m_Group>, Flags<[NoXarchOption]>;
  3261. def inline_asm_EQ : Joined<["-"], "inline-asm=">, Group<m_Group>, Flags<[CC1Option]>,
  3262. Values<"att,intel">,
  3263. NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["IAD_ATT", "IAD_Intel"]>,
  3264. MarshallingInfoEnum<CodeGenOpts<"InlineAsmDialect">, "IAD_ATT">;
  3265. def mcmodel_EQ : Joined<["-"], "mcmodel=">, Group<m_Group>, Flags<[CC1Option]>,
  3266. MarshallingInfoString<TargetOpts<"CodeModel">, [{"default"}]>;
  3267. def mtls_size_EQ : Joined<["-"], "mtls-size=">, Group<m_Group>, Flags<[NoXarchOption, CC1Option]>,
  3268. HelpText<"Specify bit size of immediate TLS offsets (AArch64 ELF only): "
  3269. "12 (for 4KB) | 24 (for 16MB, default) | 32 (for 4GB) | 48 (for 256TB, needs -mcmodel=large)">,
  3270. MarshallingInfoInt<CodeGenOpts<"TLSSize">>;
  3271. def mimplicit_it_EQ : Joined<["-"], "mimplicit-it=">, Group<m_Group>;
  3272. def mdefault_build_attributes : Joined<["-"], "mdefault-build-attributes">, Group<m_Group>;
  3273. def mno_default_build_attributes : Joined<["-"], "mno-default-build-attributes">, Group<m_Group>;
  3274. def mconstant_cfstrings : Flag<["-"], "mconstant-cfstrings">, Group<clang_ignored_m_Group>;
  3275. def mconsole : Joined<["-"], "mconsole">, Group<m_Group>, Flags<[NoXarchOption]>;
  3276. def mwindows : Joined<["-"], "mwindows">, Group<m_Group>, Flags<[NoXarchOption]>;
  3277. def mdll : Joined<["-"], "mdll">, Group<m_Group>, Flags<[NoXarchOption]>;
  3278. def municode : Joined<["-"], "municode">, Group<m_Group>, Flags<[NoXarchOption]>;
  3279. def mthreads : Joined<["-"], "mthreads">, Group<m_Group>, Flags<[NoXarchOption]>;
  3280. def mguard_EQ : Joined<["-"], "mguard=">, Group<m_Group>, Flags<[NoXarchOption]>,
  3281. HelpText<"Enable or disable Control Flow Guard checks and guard tables emission">,
  3282. Values<"none,cf,cf-nochecks">;
  3283. def mcpu_EQ : Joined<["-"], "mcpu=">, Group<m_Group>;
  3284. def mmcu_EQ : Joined<["-"], "mmcu=">, Group<m_Group>;
  3285. def msim : Flag<["-"], "msim">, Group<m_Group>;
  3286. def mdynamic_no_pic : Joined<["-"], "mdynamic-no-pic">, Group<m_Group>;
  3287. def mfix_and_continue : Flag<["-"], "mfix-and-continue">, Group<clang_ignored_m_Group>;
  3288. def mieee_fp : Flag<["-"], "mieee-fp">, Group<clang_ignored_m_Group>;
  3289. def minline_all_stringops : Flag<["-"], "minline-all-stringops">, Group<clang_ignored_m_Group>;
  3290. def mno_inline_all_stringops : Flag<["-"], "mno-inline-all-stringops">, Group<clang_ignored_m_Group>;
  3291. def malign_double : Flag<["-"], "malign-double">, Group<m_Group>, Flags<[CC1Option]>,
  3292. HelpText<"Align doubles to two words in structs (x86 only)">,
  3293. MarshallingInfoFlag<LangOpts<"AlignDouble">>;
  3294. def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">;
  3295. def mfpmath_EQ : Joined<["-"], "mfpmath=">, Group<m_Group>;
  3296. def mfpu_EQ : Joined<["-"], "mfpu=">, Group<m_Group>;
  3297. def mhwdiv_EQ : Joined<["-"], "mhwdiv=">, Group<m_Group>;
  3298. def mhwmult_EQ : Joined<["-"], "mhwmult=">, Group<m_Group>;
  3299. def mglobal_merge : Flag<["-"], "mglobal-merge">, Group<m_Group>, Flags<[CC1Option]>,
  3300. HelpText<"Enable merging of globals">;
  3301. def mhard_float : Flag<["-"], "mhard-float">, Group<m_Group>;
  3302. def mios_version_min_EQ : Joined<["-"], "mios-version-min=">,
  3303. Group<m_Group>, HelpText<"Set iOS deployment target">;
  3304. def : Joined<["-"], "miphoneos-version-min=">,
  3305. Group<m_Group>, Alias<mios_version_min_EQ>;
  3306. def mios_simulator_version_min_EQ : Joined<["-"], "mios-simulator-version-min=">;
  3307. def : Joined<["-"], "miphonesimulator-version-min=">, Alias<mios_simulator_version_min_EQ>;
  3308. def mkernel : Flag<["-"], "mkernel">, Group<m_Group>;
  3309. def mlinker_version_EQ : Joined<["-"], "mlinker-version=">,
  3310. Flags<[NoXarchOption]>;
  3311. def mllvm : Separate<["-"], "mllvm">,Flags<[CC1Option,CC1AsOption,CoreOption,FC1Option,FlangOption]>,
  3312. HelpText<"Additional arguments to forward to LLVM's option processing">,
  3313. MarshallingInfoStringVector<FrontendOpts<"LLVMArgs">>;
  3314. def mmlir : Separate<["-"], "mmlir">, Flags<[CoreOption,FC1Option,FlangOption]>,
  3315. HelpText<"Additional arguments to forward to MLIR's option processing">;
  3316. def ffuchsia_api_level_EQ : Joined<["-"], "ffuchsia-api-level=">,
  3317. Group<m_Group>, Flags<[CC1Option]>, HelpText<"Set Fuchsia API level">,
  3318. MarshallingInfoInt<LangOpts<"FuchsiaAPILevel">>;
  3319. def mmacos_version_min_EQ : Joined<["-"], "mmacos-version-min=">,
  3320. Group<m_Group>, HelpText<"Set macOS deployment target">;
  3321. def : Joined<["-"], "mmacosx-version-min=">,
  3322. Group<m_Group>, Alias<mmacos_version_min_EQ>;
  3323. def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>,
  3324. HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">,
  3325. MarshallingInfoFlag<LangOpts<"MSBitfields">>;
  3326. def moutline : Flag<["-"], "moutline">, Group<f_clang_Group>, Flags<[CC1Option]>,
  3327. HelpText<"Enable function outlining (AArch64 only)">;
  3328. def mno_outline : Flag<["-"], "mno-outline">, Group<f_clang_Group>, Flags<[CC1Option]>,
  3329. HelpText<"Disable function outlining (AArch64 only)">;
  3330. def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>,
  3331. HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">;
  3332. def mskip_rax_setup : Flag<["-"], "mskip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>,
  3333. HelpText<"Skip setting up RAX register when passing variable arguments (x86 only)">,
  3334. MarshallingInfoFlag<CodeGenOpts<"SkipRaxSetup">>;
  3335. def mno_skip_rax_setup : Flag<["-"], "mno-skip-rax-setup">, Group<m_Group>, Flags<[CC1Option]>;
  3336. def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>,
  3337. HelpText<"Force realign the stack at entry to every function">,
  3338. MarshallingInfoFlag<CodeGenOpts<"StackRealignment">>;
  3339. def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>,
  3340. HelpText<"Set the stack alignment">,
  3341. MarshallingInfoInt<CodeGenOpts<"StackAlignment">>;
  3342. def mstack_probe_size : Joined<["-"], "mstack-probe-size=">, Group<m_Group>, Flags<[CC1Option]>,
  3343. HelpText<"Set the stack probe size">,
  3344. MarshallingInfoInt<CodeGenOpts<"StackProbeSize">, "4096">;
  3345. def mstack_arg_probe : Flag<["-"], "mstack-arg-probe">, Group<m_Group>,
  3346. HelpText<"Enable stack probes">;
  3347. def mno_stack_arg_probe : Flag<["-"], "mno-stack-arg-probe">, Group<m_Group>, Flags<[CC1Option]>,
  3348. HelpText<"Disable stack probes which are enabled by default">,
  3349. MarshallingInfoFlag<CodeGenOpts<"NoStackArgProbe">>;
  3350. def mthread_model : Separate<["-"], "mthread-model">, Group<m_Group>, Flags<[CC1Option]>,
  3351. HelpText<"The thread model to use. Defaults to 'posix')">, Values<"posix,single">,
  3352. NormalizedValues<["POSIX", "Single"]>, NormalizedValuesScope<"LangOptions::ThreadModelKind">,
  3353. MarshallingInfoEnum<LangOpts<"ThreadModel">, "POSIX">;
  3354. def meabi : Separate<["-"], "meabi">, Group<m_Group>, Flags<[CC1Option]>,
  3355. HelpText<"Set EABI type. Default depends on triple)">, Values<"default,4,5,gnu">,
  3356. MarshallingInfoEnum<TargetOpts<"EABIVersion">, "Default">,
  3357. NormalizedValuesScope<"llvm::EABI">,
  3358. NormalizedValues<["Default", "EABI4", "EABI5", "GNU"]>;
  3359. def mtargetos_EQ : Joined<["-"], "mtargetos=">, Group<m_Group>,
  3360. HelpText<"Set the deployment target to be the specified OS and OS version">;
  3361. def mno_constant_cfstrings : Flag<["-"], "mno-constant-cfstrings">, Group<m_Group>;
  3362. def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, Flags<[CC1Option]>,
  3363. HelpText<"Disable merging of globals">;
  3364. def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">,
  3365. Alias<fno_pascal_strings>;
  3366. def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>;
  3367. def mno_tls_direct_seg_refs : Flag<["-"], "mno-tls-direct-seg-refs">, Group<m_Group>, Flags<[CC1Option]>,
  3368. HelpText<"Disable direct TLS access through segment registers">,
  3369. MarshallingInfoFlag<CodeGenOpts<"IndirectTlsSegRefs">>;
  3370. def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>;
  3371. def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>;
  3372. def mno_soft_float : Flag<["-"], "mno-soft-float">, Group<m_Group>;
  3373. def mno_stackrealign : Flag<["-"], "mno-stackrealign">, Group<m_Group>;
  3374. def mretpoline : Flag<["-"], "mretpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>;
  3375. def mno_retpoline : Flag<["-"], "mno-retpoline">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>;
  3376. defm speculative_load_hardening : BoolOption<"m", "speculative-load-hardening",
  3377. CodeGenOpts<"SpeculativeLoadHardening">, DefaultFalse,
  3378. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>,
  3379. Group<m_Group>;
  3380. def mlvi_hardening : Flag<["-"], "mlvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
  3381. HelpText<"Enable all mitigations for Load Value Injection (LVI)">;
  3382. def mno_lvi_hardening : Flag<["-"], "mno-lvi-hardening">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
  3383. HelpText<"Disable mitigations for Load Value Injection (LVI)">;
  3384. def mlvi_cfi : Flag<["-"], "mlvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
  3385. HelpText<"Enable only control-flow mitigations for Load Value Injection (LVI)">;
  3386. def mno_lvi_cfi : Flag<["-"], "mno-lvi-cfi">, Group<m_Group>, Flags<[CoreOption,NoXarchOption]>,
  3387. HelpText<"Disable control-flow mitigations for Load Value Injection (LVI)">;
  3388. def m_seses : Flag<["-"], "mseses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>,
  3389. HelpText<"Enable speculative execution side effect suppression (SESES). "
  3390. "Includes LVI control flow integrity mitigations">;
  3391. def mno_seses : Flag<["-"], "mno-seses">, Group<m_Group>, Flags<[CoreOption, NoXarchOption]>,
  3392. HelpText<"Disable speculative execution side effect suppression (SESES)">;
  3393. def mrelax : Flag<["-"], "mrelax">, Group<m_Group>,
  3394. HelpText<"Enable linker relaxation">;
  3395. def mno_relax : Flag<["-"], "mno-relax">, Group<m_Group>,
  3396. HelpText<"Disable linker relaxation">;
  3397. def msmall_data_limit_EQ : Joined<["-"], "msmall-data-limit=">, Group<m_Group>,
  3398. Alias<G>,
  3399. HelpText<"Put global and static data smaller than the limit into a special section">;
  3400. def msave_restore : Flag<["-"], "msave-restore">, Group<m_riscv_Features_Group>,
  3401. HelpText<"Enable using library calls for save and restore">;
  3402. def mno_save_restore : Flag<["-"], "mno-save-restore">, Group<m_riscv_Features_Group>,
  3403. HelpText<"Disable using library calls for save and restore">;
  3404. def mcmodel_EQ_medlow : Flag<["-"], "mcmodel=medlow">, Group<m_Group>,
  3405. Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["small"]>,
  3406. HelpText<"Equivalent to -mcmodel=small, compatible with RISC-V gcc.">;
  3407. def mcmodel_EQ_medany : Flag<["-"], "mcmodel=medany">, Group<m_Group>,
  3408. Flags<[CC1Option]>, Alias<mcmodel_EQ>, AliasArgs<["medium"]>,
  3409. HelpText<"Equivalent to -mcmodel=medium, compatible with RISC-V gcc.">;
  3410. def menable_experimental_extensions : Flag<["-"], "menable-experimental-extensions">, Group<m_Group>,
  3411. HelpText<"Enable use of experimental RISC-V extensions.">;
  3412. def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>,
  3413. HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">;
  3414. def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_arm_Features_Group>,
  3415. HelpText<"Force all memory accesses to be aligned (AArch32/AArch64 only)">;
  3416. def mstrict_align : Flag<["-"], "mstrict-align">, Alias<mno_unaligned_access>, Flags<[CC1Option,HelpHidden]>,
  3417. HelpText<"Force all memory accesses to be aligned (same as mno-unaligned-access)">;
  3418. def mno_thumb : Flag<["-"], "mno-thumb">, Group<m_arm_Features_Group>;
  3419. def mrestrict_it: Flag<["-"], "mrestrict-it">, Group<m_arm_Features_Group>,
  3420. HelpText<"Disallow generation of complex IT blocks.">;
  3421. def mno_restrict_it: Flag<["-"], "mno-restrict-it">, Group<m_arm_Features_Group>,
  3422. HelpText<"Allow generation of complex IT blocks.">;
  3423. def marm : Flag<["-"], "marm">, Alias<mno_thumb>;
  3424. def ffixed_r9 : Flag<["-"], "ffixed-r9">, Group<m_arm_Features_Group>,
  3425. HelpText<"Reserve the r9 register (ARM only)">;
  3426. def mno_movt : Flag<["-"], "mno-movt">, Group<m_arm_Features_Group>,
  3427. HelpText<"Disallow use of movt/movw pairs (ARM only)">;
  3428. def mcrc : Flag<["-"], "mcrc">, Group<m_Group>,
  3429. HelpText<"Allow use of CRC instructions (ARM/Mips only)">;
  3430. def mnocrc : Flag<["-"], "mnocrc">, Group<m_arm_Features_Group>,
  3431. HelpText<"Disallow use of CRC instructions (ARM only)">;
  3432. def mno_neg_immediates: Flag<["-"], "mno-neg-immediates">, Group<m_arm_Features_Group>,
  3433. HelpText<"Disallow converting instructions with negative immediates to their negation or inversion.">;
  3434. def mcmse : Flag<["-"], "mcmse">, Group<m_arm_Features_Group>,
  3435. Flags<[NoXarchOption,CC1Option]>,
  3436. HelpText<"Allow use of CMSE (Armv8-M Security Extensions)">,
  3437. MarshallingInfoFlag<LangOpts<"Cmse">>;
  3438. def ForceAAPCSBitfieldLoad : Flag<["-"], "faapcs-bitfield-load">, Group<m_arm_Features_Group>,
  3439. Flags<[NoXarchOption,CC1Option]>,
  3440. HelpText<"Follows the AAPCS standard that all volatile bit-field write generates at least one load. (ARM only).">,
  3441. MarshallingInfoFlag<CodeGenOpts<"ForceAAPCSBitfieldLoad">>;
  3442. defm aapcs_bitfield_width : BoolOption<"f", "aapcs-bitfield-width",
  3443. CodeGenOpts<"AAPCSBitfieldWidth">, DefaultTrue,
  3444. NegFlag<SetFalse, [], "Do not follow">, PosFlag<SetTrue, [], "Follow">,
  3445. BothFlags<[NoXarchOption, CC1Option], " the AAPCS standard requirement stating that"
  3446. " volatile bit-field width is dictated by the field container type. (ARM only).">>,
  3447. Group<m_arm_Features_Group>;
  3448. def mframe_chain : Joined<["-"], "mframe-chain=">,
  3449. Group<m_arm_Features_Group>, Values<"none,aapcs,aapcs+leaf">,
  3450. HelpText<"Select the frame chain model used to emit frame records (Arm only).">;
  3451. def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group<m_Group>,
  3452. HelpText<"Generate code which only uses the general purpose registers (AArch64/x86 only)">;
  3453. def mfix_cmse_cve_2021_35465 : Flag<["-"], "mfix-cmse-cve-2021-35465">,
  3454. Group<m_arm_Features_Group>,
  3455. HelpText<"Work around VLLDM erratum CVE-2021-35465 (ARM only)">;
  3456. def mno_fix_cmse_cve_2021_35465 : Flag<["-"], "mno-fix-cmse-cve-2021-35465">,
  3457. Group<m_arm_Features_Group>,
  3458. HelpText<"Don't work around VLLDM erratum CVE-2021-35465 (ARM only)">;
  3459. def mfix_cortex_a57_aes_1742098 : Flag<["-"], "mfix-cortex-a57-aes-1742098">,
  3460. Group<m_arm_Features_Group>,
  3461. HelpText<"Work around Cortex-A57 Erratum 1742098 (ARM only)">;
  3462. def mno_fix_cortex_a57_aes_1742098 : Flag<["-"], "mno-fix-cortex-a57-aes-1742098">,
  3463. Group<m_arm_Features_Group>,
  3464. HelpText<"Don't work around Cortex-A57 Erratum 1742098 (ARM only)">;
  3465. def mfix_cortex_a72_aes_1655431 : Flag<["-"], "mfix-cortex-a72-aes-1655431">,
  3466. Group<m_arm_Features_Group>,
  3467. HelpText<"Work around Cortex-A72 Erratum 1655431 (ARM only)">,
  3468. Alias<mfix_cortex_a57_aes_1742098>;
  3469. def mno_fix_cortex_a72_aes_1655431 : Flag<["-"], "mno-fix-cortex-a72-aes-1655431">,
  3470. Group<m_arm_Features_Group>,
  3471. HelpText<"Don't work around Cortex-A72 Erratum 1655431 (ARM only)">,
  3472. Alias<mno_fix_cortex_a57_aes_1742098>;
  3473. def mfix_cortex_a53_835769 : Flag<["-"], "mfix-cortex-a53-835769">,
  3474. Group<m_aarch64_Features_Group>,
  3475. HelpText<"Workaround Cortex-A53 erratum 835769 (AArch64 only)">;
  3476. def mno_fix_cortex_a53_835769 : Flag<["-"], "mno-fix-cortex-a53-835769">,
  3477. Group<m_aarch64_Features_Group>,
  3478. HelpText<"Don't workaround Cortex-A53 erratum 835769 (AArch64 only)">;
  3479. def mmark_bti_property : Flag<["-"], "mmark-bti-property">,
  3480. Group<m_aarch64_Features_Group>,
  3481. HelpText<"Add .note.gnu.property with BTI to assembly files (AArch64 only)">;
  3482. def mno_bti_at_return_twice : Flag<["-"], "mno-bti-at-return-twice">,
  3483. Group<m_arm_Features_Group>,
  3484. HelpText<"Do not add a BTI instruction after a setjmp or other"
  3485. " return-twice construct (Arm/AArch64 only)">;
  3486. foreach i = {1-31} in
  3487. def ffixed_x#i : Flag<["-"], "ffixed-x"#i>, Group<m_Group>,
  3488. HelpText<"Reserve the x"#i#" register (AArch64/RISC-V only)">;
  3489. foreach i = {8-15,18} in
  3490. def fcall_saved_x#i : Flag<["-"], "fcall-saved-x"#i>, Group<m_aarch64_Features_Group>,
  3491. HelpText<"Make the x"#i#" register call-saved (AArch64 only)">;
  3492. def msve_vector_bits_EQ : Joined<["-"], "msve-vector-bits=">, Group<m_aarch64_Features_Group>,
  3493. HelpText<"Specify the size in bits of an SVE vector register. Defaults to the"
  3494. " vector length agnostic value of \"scalable\". (AArch64 only)">;
  3495. def mvscale_min_EQ : Joined<["-"], "mvscale-min=">,
  3496. Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>,
  3497. HelpText<"Specify the vscale minimum. Defaults to \"1\". (AArch64 only)">,
  3498. MarshallingInfoInt<LangOpts<"VScaleMin">>;
  3499. def mvscale_max_EQ : Joined<["-"], "mvscale-max=">,
  3500. Group<m_aarch64_Features_Group>, Flags<[NoXarchOption,CC1Option]>,
  3501. HelpText<"Specify the vscale maximum. Defaults to the"
  3502. " vector length agnostic value of \"0\". (AArch64 only)">,
  3503. MarshallingInfoInt<LangOpts<"VScaleMax">>;
  3504. def msign_return_address_EQ : Joined<["-"], "msign-return-address=">,
  3505. Flags<[CC1Option]>, Group<m_Group>, Values<"none,all,non-leaf">,
  3506. HelpText<"Select return address signing scope">;
  3507. def mbranch_protection_EQ : Joined<["-"], "mbranch-protection=">,
  3508. Group<m_Group>,
  3509. HelpText<"Enforce targets of indirect branches and function returns">;
  3510. def mharden_sls_EQ : Joined<["-"], "mharden-sls=">,
  3511. HelpText<"Select straight-line speculation hardening scope (ARM/AArch64/X86"
  3512. " only). <arg> must be: all, none, retbr(ARM/AArch64),"
  3513. " blr(ARM/AArch64), comdat(ARM/AArch64), nocomdat(ARM/AArch64),"
  3514. " return(X86), indirect-jmp(X86)">;
  3515. def msimd128 : Flag<["-"], "msimd128">, Group<m_wasm_Features_Group>;
  3516. def mno_simd128 : Flag<["-"], "mno-simd128">, Group<m_wasm_Features_Group>;
  3517. def mrelaxed_simd : Flag<["-"], "mrelaxed-simd">, Group<m_wasm_Features_Group>;
  3518. def mno_relaxed_simd : Flag<["-"], "mno-relaxed-simd">, Group<m_wasm_Features_Group>;
  3519. def mnontrapping_fptoint : Flag<["-"], "mnontrapping-fptoint">, Group<m_wasm_Features_Group>;
  3520. def mno_nontrapping_fptoint : Flag<["-"], "mno-nontrapping-fptoint">, Group<m_wasm_Features_Group>;
  3521. def msign_ext : Flag<["-"], "msign-ext">, Group<m_wasm_Features_Group>;
  3522. def mno_sign_ext : Flag<["-"], "mno-sign-ext">, Group<m_wasm_Features_Group>;
  3523. def mexception_handing : Flag<["-"], "mexception-handling">, Group<m_wasm_Features_Group>;
  3524. def mno_exception_handing : Flag<["-"], "mno-exception-handling">, Group<m_wasm_Features_Group>;
  3525. def matomics : Flag<["-"], "matomics">, Group<m_wasm_Features_Group>;
  3526. def mno_atomics : Flag<["-"], "mno-atomics">, Group<m_wasm_Features_Group>;
  3527. def mbulk_memory : Flag<["-"], "mbulk-memory">, Group<m_wasm_Features_Group>;
  3528. def mno_bulk_memory : Flag<["-"], "mno-bulk-memory">, Group<m_wasm_Features_Group>;
  3529. def mmutable_globals : Flag<["-"], "mmutable-globals">, Group<m_wasm_Features_Group>;
  3530. def mno_mutable_globals : Flag<["-"], "mno-mutable-globals">, Group<m_wasm_Features_Group>;
  3531. def mmultivalue : Flag<["-"], "mmultivalue">, Group<m_wasm_Features_Group>;
  3532. def mno_multivalue : Flag<["-"], "mno-multivalue">, Group<m_wasm_Features_Group>;
  3533. def mtail_call : Flag<["-"], "mtail-call">, Group<m_wasm_Features_Group>;
  3534. def mno_tail_call : Flag<["-"], "mno-tail-call">, Group<m_wasm_Features_Group>;
  3535. def mreference_types : Flag<["-"], "mreference-types">, Group<m_wasm_Features_Group>;
  3536. def mno_reference_types : Flag<["-"], "mno-reference-types">, Group<m_wasm_Features_Group>;
  3537. def mextended_const : Flag<["-"], "mextended-const">, Group<m_wasm_Features_Group>;
  3538. def mno_extended_const : Flag<["-"], "mno-extended-const">, Group<m_wasm_Features_Group>;
  3539. def mexec_model_EQ : Joined<["-"], "mexec-model=">, Group<m_wasm_Features_Driver_Group>,
  3540. Values<"command,reactor">,
  3541. HelpText<"Execution model (WebAssembly only)">;
  3542. defm amdgpu_ieee : BoolOption<"m", "amdgpu-ieee",
  3543. CodeGenOpts<"EmitIEEENaNCompliantInsts">, DefaultTrue,
  3544. PosFlag<SetTrue, [], "Sets the IEEE bit in the expected default floating point "
  3545. " mode register. Floating point opcodes that support exception flag "
  3546. "gathering quiet and propagate signaling NaN inputs per IEEE 754-2008. "
  3547. "This option changes the ABI. (AMDGPU only)">,
  3548. NegFlag<SetFalse, [CC1Option]>>, Group<m_Group>;
  3549. def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group<m_Group>,
  3550. HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)">,
  3551. Flags<[CC1Option]>,
  3552. Values<"none,2,3,4,5">,
  3553. NormalizedValuesScope<"TargetOptions">,
  3554. NormalizedValues<["COV_None", "COV_2", "COV_3", "COV_4", "COV_5"]>,
  3555. MarshallingInfoEnum<TargetOpts<"CodeObjectVersion">, "COV_4">;
  3556. defm code_object_v3_legacy : SimpleMFlag<"code-object-v3",
  3557. "Legacy option to specify code object ABI V3",
  3558. "Legacy option to specify code object ABI V2",
  3559. " (AMDGPU only)">;
  3560. defm cumode : SimpleMFlag<"cumode",
  3561. "Specify CU wavefront", "Specify WGP wavefront",
  3562. " execution mode (AMDGPU only)", m_amdgpu_Features_Group>;
  3563. defm tgsplit : SimpleMFlag<"tgsplit", "Enable", "Disable",
  3564. " threadgroup split execution mode (AMDGPU only)", m_amdgpu_Features_Group>;
  3565. defm wavefrontsize64 : SimpleMFlag<"wavefrontsize64",
  3566. "Specify wavefront size 64", "Specify wavefront size 32",
  3567. " mode (AMDGPU only)">;
  3568. defm unsafe_fp_atomics : BoolOption<"m", "unsafe-fp-atomics",
  3569. TargetOpts<"AllowAMDGPUUnsafeFPAtomics">, DefaultFalse,
  3570. PosFlag<SetTrue, [CC1Option], "Enable unsafe floating point atomic instructions (AMDGPU only)">,
  3571. NegFlag<SetFalse>>, Group<m_Group>;
  3572. def faltivec : Flag<["-"], "faltivec">, Group<f_Group>, Flags<[NoXarchOption]>;
  3573. def fno_altivec : Flag<["-"], "fno-altivec">, Group<f_Group>, Flags<[NoXarchOption]>;
  3574. def maltivec : Flag<["-"], "maltivec">, Group<m_ppc_Features_Group>;
  3575. def mno_altivec : Flag<["-"], "mno-altivec">, Group<m_ppc_Features_Group>;
  3576. def mpcrel: Flag<["-"], "mpcrel">, Group<m_ppc_Features_Group>;
  3577. def mno_pcrel: Flag<["-"], "mno-pcrel">, Group<m_ppc_Features_Group>;
  3578. def mprefixed: Flag<["-"], "mprefixed">, Group<m_ppc_Features_Group>;
  3579. def mno_prefixed: Flag<["-"], "mno-prefixed">, Group<m_ppc_Features_Group>;
  3580. def mspe : Flag<["-"], "mspe">, Group<m_ppc_Features_Group>;
  3581. def mno_spe : Flag<["-"], "mno-spe">, Group<m_ppc_Features_Group>;
  3582. def mefpu2 : Flag<["-"], "mefpu2">, Group<m_ppc_Features_Group>;
  3583. def mabi_EQ_vec_extabi : Flag<["-"], "mabi=vec-extabi">, Group<m_Group>, Flags<[CC1Option]>,
  3584. HelpText<"Enable the extended Altivec ABI on AIX (AIX only). Uses volatile and nonvolatile vector registers">,
  3585. MarshallingInfoFlag<LangOpts<"EnableAIXExtendedAltivecABI">>;
  3586. def mabi_EQ_vec_default : Flag<["-"], "mabi=vec-default">, Group<m_Group>, Flags<[CC1Option]>,
  3587. HelpText<"Enable the default Altivec ABI on AIX (AIX only). Uses only volatile vector registers.">;
  3588. def mabi_EQ_quadword_atomics : Flag<["-"], "mabi=quadword-atomics">,
  3589. Group<m_Group>, Flags<[CC1Option]>,
  3590. HelpText<"Enable quadword atomics ABI on AIX (AIX PPC64 only). Uses lqarx/stqcx. instructions.">,
  3591. MarshallingInfoFlag<LangOpts<"EnableAIXQuadwordAtomicsABI">>;
  3592. def mvsx : Flag<["-"], "mvsx">, Group<m_ppc_Features_Group>;
  3593. def mno_vsx : Flag<["-"], "mno-vsx">, Group<m_ppc_Features_Group>;
  3594. def msecure_plt : Flag<["-"], "msecure-plt">, Group<m_ppc_Features_Group>;
  3595. def mpower8_vector : Flag<["-"], "mpower8-vector">,
  3596. Group<m_ppc_Features_Group>;
  3597. def mno_power8_vector : Flag<["-"], "mno-power8-vector">,
  3598. Group<m_ppc_Features_Group>;
  3599. def mpower9_vector : Flag<["-"], "mpower9-vector">,
  3600. Group<m_ppc_Features_Group>;
  3601. def mno_power9_vector : Flag<["-"], "mno-power9-vector">,
  3602. Group<m_ppc_Features_Group>;
  3603. def mpower10_vector : Flag<["-"], "mpower10-vector">,
  3604. Group<m_ppc_Features_Group>;
  3605. def mno_power10_vector : Flag<["-"], "mno-power10-vector">,
  3606. Group<m_ppc_Features_Group>;
  3607. def mpower8_crypto : Flag<["-"], "mcrypto">,
  3608. Group<m_ppc_Features_Group>;
  3609. def mnopower8_crypto : Flag<["-"], "mno-crypto">,
  3610. Group<m_ppc_Features_Group>;
  3611. def mdirect_move : Flag<["-"], "mdirect-move">,
  3612. Group<m_ppc_Features_Group>;
  3613. def mnodirect_move : Flag<["-"], "mno-direct-move">,
  3614. Group<m_ppc_Features_Group>;
  3615. def mpaired_vector_memops: Flag<["-"], "mpaired-vector-memops">,
  3616. Group<m_ppc_Features_Group>;
  3617. def mnopaired_vector_memops: Flag<["-"], "mno-paired-vector-memops">,
  3618. Group<m_ppc_Features_Group>;
  3619. def mhtm : Flag<["-"], "mhtm">, Group<m_ppc_Features_Group>;
  3620. def mno_htm : Flag<["-"], "mno-htm">, Group<m_ppc_Features_Group>;
  3621. def mfprnd : Flag<["-"], "mfprnd">, Group<m_ppc_Features_Group>;
  3622. def mno_fprnd : Flag<["-"], "mno-fprnd">, Group<m_ppc_Features_Group>;
  3623. def mcmpb : Flag<["-"], "mcmpb">, Group<m_ppc_Features_Group>;
  3624. def mno_cmpb : Flag<["-"], "mno-cmpb">, Group<m_ppc_Features_Group>;
  3625. def misel : Flag<["-"], "misel">, Group<m_ppc_Features_Group>;
  3626. def mno_isel : Flag<["-"], "mno-isel">, Group<m_ppc_Features_Group>;
  3627. def mmfocrf : Flag<["-"], "mmfocrf">, Group<m_ppc_Features_Group>;
  3628. def mmfcrf : Flag<["-"], "mmfcrf">, Alias<mmfocrf>;
  3629. def mno_mfocrf : Flag<["-"], "mno-mfocrf">, Group<m_ppc_Features_Group>;
  3630. def mno_mfcrf : Flag<["-"], "mno-mfcrf">, Alias<mno_mfocrf>;
  3631. def mpopcntd : Flag<["-"], "mpopcntd">, Group<m_ppc_Features_Group>;
  3632. def mno_popcntd : Flag<["-"], "mno-popcntd">, Group<m_ppc_Features_Group>;
  3633. def mcrbits : Flag<["-"], "mcrbits">, Group<m_ppc_Features_Group>;
  3634. def mno_crbits : Flag<["-"], "mno-crbits">, Group<m_ppc_Features_Group>;
  3635. def minvariant_function_descriptors :
  3636. Flag<["-"], "minvariant-function-descriptors">, Group<m_ppc_Features_Group>;
  3637. def mno_invariant_function_descriptors :
  3638. Flag<["-"], "mno-invariant-function-descriptors">,
  3639. Group<m_ppc_Features_Group>;
  3640. def mfloat128: Flag<["-"], "mfloat128">,
  3641. Group<m_ppc_Features_Group>;
  3642. def mno_float128 : Flag<["-"], "mno-float128">,
  3643. Group<m_ppc_Features_Group>;
  3644. def mlongcall: Flag<["-"], "mlongcall">,
  3645. Group<m_ppc_Features_Group>;
  3646. def mno_longcall : Flag<["-"], "mno-longcall">,
  3647. Group<m_ppc_Features_Group>;
  3648. def mmma: Flag<["-"], "mmma">, Group<m_ppc_Features_Group>;
  3649. def mno_mma: Flag<["-"], "mno-mma">, Group<m_ppc_Features_Group>;
  3650. def mrop_protect : Flag<["-"], "mrop-protect">,
  3651. Group<m_ppc_Features_Group>;
  3652. def mprivileged : Flag<["-"], "mprivileged">,
  3653. Group<m_ppc_Features_Group>;
  3654. def maix_struct_return : Flag<["-"], "maix-struct-return">,
  3655. Group<m_Group>, Flags<[CC1Option]>,
  3656. HelpText<"Return all structs in memory (PPC32 only)">;
  3657. def msvr4_struct_return : Flag<["-"], "msvr4-struct-return">,
  3658. Group<m_Group>, Flags<[CC1Option]>,
  3659. HelpText<"Return small structs in registers (PPC32 only)">;
  3660. def mvx : Flag<["-"], "mvx">, Group<m_Group>;
  3661. def mno_vx : Flag<["-"], "mno-vx">, Group<m_Group>;
  3662. defm zvector : BoolFOption<"zvector",
  3663. LangOpts<"ZVector">, DefaultFalse,
  3664. PosFlag<SetTrue, [CC1Option], "Enable System z vector language extension">,
  3665. NegFlag<SetFalse>>;
  3666. def mzvector : Flag<["-"], "mzvector">, Alias<fzvector>;
  3667. def mno_zvector : Flag<["-"], "mno-zvector">, Alias<fno_zvector>;
  3668. def mignore_xcoff_visibility : Flag<["-"], "mignore-xcoff-visibility">, Group<m_Group>,
  3669. HelpText<"Not emit the visibility attribute for asm in AIX OS or give all symbols 'unspecified' visibility in XCOFF object file">,
  3670. Flags<[CC1Option]>;
  3671. defm backchain : BoolOption<"m", "backchain",
  3672. CodeGenOpts<"Backchain">, DefaultFalse,
  3673. PosFlag<SetTrue, [], "Link stack frames through backchain on System Z">,
  3674. NegFlag<SetFalse>, BothFlags<[NoXarchOption,CC1Option]>>, Group<m_Group>;
  3675. def mno_warn_nonportable_cfstrings : Flag<["-"], "mno-warn-nonportable-cfstrings">, Group<m_Group>;
  3676. def mno_omit_leaf_frame_pointer : Flag<["-"], "mno-omit-leaf-frame-pointer">, Group<m_Group>;
  3677. def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, Group<m_Group>,
  3678. HelpText<"Omit frame pointer setup for leaf functions">;
  3679. def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>;
  3680. def mpascal_strings : Flag<["-"], "mpascal-strings">, Alias<fpascal_strings>;
  3681. def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>;
  3682. def mtls_direct_seg_refs : Flag<["-"], "mtls-direct-seg-refs">, Group<m_Group>,
  3683. HelpText<"Enable direct TLS access through segment registers (default)">;
  3684. def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>;
  3685. def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, Flags<[CC1Option,CC1AsOption]>,
  3686. HelpText<"(integrated-as) Relax all machine instructions">,
  3687. MarshallingInfoFlag<CodeGenOpts<"RelaxAll">>;
  3688. def mincremental_linker_compatible : Flag<["-"], "mincremental-linker-compatible">, Group<m_Group>,
  3689. Flags<[CC1Option,CC1AsOption]>,
  3690. HelpText<"(integrated-as) Emit an object file which can be used with an incremental linker">,
  3691. MarshallingInfoFlag<CodeGenOpts<"IncrementalLinkerCompatible">>;
  3692. def mno_incremental_linker_compatible : Flag<["-"], "mno-incremental-linker-compatible">, Group<m_Group>,
  3693. HelpText<"(integrated-as) Emit an object file which cannot be used with an incremental linker">;
  3694. def mrtd : Flag<["-"], "mrtd">, Group<m_Group>, Flags<[CC1Option]>,
  3695. HelpText<"Make StdCall calling convention the default">;
  3696. def msmall_data_threshold_EQ : Joined <["-"], "msmall-data-threshold=">,
  3697. Group<m_Group>, Alias<G>;
  3698. def msoft_float : Flag<["-"], "msoft-float">, Group<m_Group>, Flags<[CC1Option]>,
  3699. HelpText<"Use software floating point">,
  3700. MarshallingInfoFlag<CodeGenOpts<"SoftFloat">>;
  3701. def mno_fmv : Flag<["-"], "mno-fmv">, Group<f_clang_Group>, Flags<[CC1Option]>,
  3702. HelpText<"Disable function multiversioning">;
  3703. def moutline_atomics : Flag<["-"], "moutline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>,
  3704. HelpText<"Generate local calls to out-of-line atomic operations">;
  3705. def mno_outline_atomics : Flag<["-"], "mno-outline-atomics">, Group<f_clang_Group>, Flags<[CC1Option]>,
  3706. HelpText<"Don't generate local calls to out-of-line atomic operations">;
  3707. def mno_implicit_float : Flag<["-"], "mno-implicit-float">, Group<m_Group>,
  3708. HelpText<"Don't generate implicit floating point or vector instructions">;
  3709. def mimplicit_float : Flag<["-"], "mimplicit-float">, Group<m_Group>;
  3710. def mrecip : Flag<["-"], "mrecip">, Group<m_Group>;
  3711. def mrecip_EQ : CommaJoined<["-"], "mrecip=">, Group<m_Group>, Flags<[CC1Option]>,
  3712. MarshallingInfoStringVector<CodeGenOpts<"Reciprocals">>;
  3713. def mprefer_vector_width_EQ : Joined<["-"], "mprefer-vector-width=">, Group<m_Group>, Flags<[CC1Option]>,
  3714. HelpText<"Specifies preferred vector width for auto-vectorization. Defaults to 'none' which allows target specific decisions.">,
  3715. MarshallingInfoString<CodeGenOpts<"PreferVectorWidth">>;
  3716. def mstack_protector_guard_EQ : Joined<["-"], "mstack-protector-guard=">, Group<m_Group>, Flags<[CC1Option]>,
  3717. HelpText<"Use the given guard (global, tls) for addressing the stack-protector guard">,
  3718. MarshallingInfoString<CodeGenOpts<"StackProtectorGuard">>;
  3719. def mstack_protector_guard_offset_EQ : Joined<["-"], "mstack-protector-guard-offset=">, Group<m_Group>, Flags<[CC1Option]>,
  3720. HelpText<"Use the given offset for addressing the stack-protector guard">,
  3721. MarshallingInfoInt<CodeGenOpts<"StackProtectorGuardOffset">, "INT_MAX", "int">;
  3722. def mstack_protector_guard_symbol_EQ : Joined<["-"], "mstack-protector-guard-symbol=">, Group<m_Group>, Flags<[CC1Option]>,
  3723. HelpText<"Use the given symbol for addressing the stack-protector guard">,
  3724. MarshallingInfoString<CodeGenOpts<"StackProtectorGuardSymbol">>;
  3725. def mstack_protector_guard_reg_EQ : Joined<["-"], "mstack-protector-guard-reg=">, Group<m_Group>, Flags<[CC1Option]>,
  3726. HelpText<"Use the given reg for addressing the stack-protector guard">,
  3727. MarshallingInfoString<CodeGenOpts<"StackProtectorGuardReg">>;
  3728. def mfentry : Flag<["-"], "mfentry">, HelpText<"Insert calls to fentry at function entry (x86/SystemZ only)">,
  3729. Flags<[CC1Option]>, Group<m_Group>,
  3730. MarshallingInfoFlag<CodeGenOpts<"CallFEntry">>;
  3731. def mnop_mcount : Flag<["-"], "mnop-mcount">, HelpText<"Generate mcount/__fentry__ calls as nops. To activate they need to be patched in.">,
  3732. Flags<[CC1Option]>, Group<m_Group>,
  3733. MarshallingInfoFlag<CodeGenOpts<"MNopMCount">>;
  3734. def mrecord_mcount : Flag<["-"], "mrecord-mcount">, HelpText<"Generate a __mcount_loc section entry for each __fentry__ call.">,
  3735. Flags<[CC1Option]>, Group<m_Group>,
  3736. MarshallingInfoFlag<CodeGenOpts<"RecordMCount">>;
  3737. def mpacked_stack : Flag<["-"], "mpacked-stack">, HelpText<"Use packed stack layout (SystemZ only).">,
  3738. Flags<[CC1Option]>, Group<m_Group>,
  3739. MarshallingInfoFlag<CodeGenOpts<"PackedStack">>;
  3740. def mno_packed_stack : Flag<["-"], "mno-packed-stack">, Flags<[CC1Option]>, Group<m_Group>;
  3741. def mips16 : Flag<["-"], "mips16">, Group<m_mips_Features_Group>;
  3742. def mno_mips16 : Flag<["-"], "mno-mips16">, Group<m_mips_Features_Group>;
  3743. def mmicromips : Flag<["-"], "mmicromips">, Group<m_mips_Features_Group>;
  3744. def mno_micromips : Flag<["-"], "mno-micromips">, Group<m_mips_Features_Group>;
  3745. def mxgot : Flag<["-"], "mxgot">, Group<m_mips_Features_Group>;
  3746. def mno_xgot : Flag<["-"], "mno-xgot">, Group<m_mips_Features_Group>;
  3747. def mldc1_sdc1 : Flag<["-"], "mldc1-sdc1">, Group<m_mips_Features_Group>;
  3748. def mno_ldc1_sdc1 : Flag<["-"], "mno-ldc1-sdc1">, Group<m_mips_Features_Group>;
  3749. def mcheck_zero_division : Flag<["-"], "mcheck-zero-division">,
  3750. Group<m_mips_Features_Group>;
  3751. def mno_check_zero_division : Flag<["-"], "mno-check-zero-division">,
  3752. Group<m_mips_Features_Group>;
  3753. def mfix4300 : Flag<["-"], "mfix4300">, Group<m_mips_Features_Group>;
  3754. def mcompact_branches_EQ : Joined<["-"], "mcompact-branches=">,
  3755. Group<m_mips_Features_Group>;
  3756. def mbranch_likely : Flag<["-"], "mbranch-likely">, Group<m_Group>,
  3757. IgnoredGCCCompat;
  3758. def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group<m_Group>,
  3759. IgnoredGCCCompat;
  3760. def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">,
  3761. Group<m_mips_Features_Group>,
  3762. HelpText<"Change indirect jump instructions to inhibit speculation">;
  3763. def mdsp : Flag<["-"], "mdsp">, Group<m_mips_Features_Group>;
  3764. def mno_dsp : Flag<["-"], "mno-dsp">, Group<m_mips_Features_Group>;
  3765. def mdspr2 : Flag<["-"], "mdspr2">, Group<m_mips_Features_Group>;
  3766. def mno_dspr2 : Flag<["-"], "mno-dspr2">, Group<m_mips_Features_Group>;
  3767. def msingle_float : Flag<["-"], "msingle-float">, Group<m_Group>;
  3768. def mdouble_float : Flag<["-"], "mdouble-float">, Group<m_Group>;
  3769. def mmadd4 : Flag<["-"], "mmadd4">, Group<m_mips_Features_Group>,
  3770. HelpText<"Enable the generation of 4-operand madd.s, madd.d and related instructions.">;
  3771. def mno_madd4 : Flag<["-"], "mno-madd4">, Group<m_mips_Features_Group>,
  3772. HelpText<"Disable the generation of 4-operand madd.s, madd.d and related instructions.">;
  3773. def mmsa : Flag<["-"], "mmsa">, Group<m_mips_Features_Group>,
  3774. HelpText<"Enable MSA ASE (MIPS only)">;
  3775. def mno_msa : Flag<["-"], "mno-msa">, Group<m_mips_Features_Group>,
  3776. HelpText<"Disable MSA ASE (MIPS only)">;
  3777. def mmt : Flag<["-"], "mmt">, Group<m_mips_Features_Group>,
  3778. HelpText<"Enable MT ASE (MIPS only)">;
  3779. def mno_mt : Flag<["-"], "mno-mt">, Group<m_mips_Features_Group>,
  3780. HelpText<"Disable MT ASE (MIPS only)">;
  3781. def mfp64 : Flag<["-"], "mfp64">, Group<m_mips_Features_Group>,
  3782. HelpText<"Use 64-bit floating point registers (MIPS only)">;
  3783. def mfp32 : Flag<["-"], "mfp32">, Group<m_mips_Features_Group>,
  3784. HelpText<"Use 32-bit floating point registers (MIPS only)">;
  3785. def mgpopt : Flag<["-"], "mgpopt">, Group<m_mips_Features_Group>,
  3786. HelpText<"Use GP relative accesses for symbols known to be in a small"
  3787. " data section (MIPS)">;
  3788. def mno_gpopt : Flag<["-"], "mno-gpopt">, Group<m_mips_Features_Group>,
  3789. HelpText<"Do not use GP relative accesses for symbols known to be in a small"
  3790. " data section (MIPS)">;
  3791. def mlocal_sdata : Flag<["-"], "mlocal-sdata">,
  3792. Group<m_mips_Features_Group>,
  3793. HelpText<"Extend the -G behaviour to object local data (MIPS)">;
  3794. def mno_local_sdata : Flag<["-"], "mno-local-sdata">,
  3795. Group<m_mips_Features_Group>,
  3796. HelpText<"Do not extend the -G behaviour to object local data (MIPS)">;
  3797. def mextern_sdata : Flag<["-"], "mextern-sdata">,
  3798. Group<m_mips_Features_Group>,
  3799. HelpText<"Assume that externally defined data is in the small data if it"
  3800. " meets the -G <size> threshold (MIPS)">;
  3801. def mno_extern_sdata : Flag<["-"], "mno-extern-sdata">,
  3802. Group<m_mips_Features_Group>,
  3803. HelpText<"Do not assume that externally defined data is in the small data if"
  3804. " it meets the -G <size> threshold (MIPS)">;
  3805. def membedded_data : Flag<["-"], "membedded-data">,
  3806. Group<m_mips_Features_Group>,
  3807. HelpText<"Place constants in the .rodata section instead of the .sdata "
  3808. "section even if they meet the -G <size> threshold (MIPS)">;
  3809. def mno_embedded_data : Flag<["-"], "mno-embedded-data">,
  3810. Group<m_mips_Features_Group>,
  3811. HelpText<"Do not place constants in the .rodata section instead of the "
  3812. ".sdata if they meet the -G <size> threshold (MIPS)">;
  3813. def mnan_EQ : Joined<["-"], "mnan=">, Group<m_mips_Features_Group>;
  3814. def mabs_EQ : Joined<["-"], "mabs=">, Group<m_mips_Features_Group>;
  3815. def mabicalls : Flag<["-"], "mabicalls">, Group<m_mips_Features_Group>,
  3816. HelpText<"Enable SVR4-style position-independent code (Mips only)">;
  3817. def mno_abicalls : Flag<["-"], "mno-abicalls">, Group<m_mips_Features_Group>,
  3818. HelpText<"Disable SVR4-style position-independent code (Mips only)">;
  3819. def mno_crc : Flag<["-"], "mno-crc">, Group<m_mips_Features_Group>,
  3820. HelpText<"Disallow use of CRC instructions (Mips only)">;
  3821. def mvirt : Flag<["-"], "mvirt">, Group<m_mips_Features_Group>;
  3822. def mno_virt : Flag<["-"], "mno-virt">, Group<m_mips_Features_Group>;
  3823. def mginv : Flag<["-"], "mginv">, Group<m_mips_Features_Group>;
  3824. def mno_ginv : Flag<["-"], "mno-ginv">, Group<m_mips_Features_Group>;
  3825. def mips1 : Flag<["-"], "mips1">,
  3826. Alias<march_EQ>, AliasArgs<["mips1"]>, Group<m_mips_Features_Group>,
  3827. HelpText<"Equivalent to -march=mips1">, Flags<[HelpHidden]>;
  3828. def mips2 : Flag<["-"], "mips2">,
  3829. Alias<march_EQ>, AliasArgs<["mips2"]>, Group<m_mips_Features_Group>,
  3830. HelpText<"Equivalent to -march=mips2">, Flags<[HelpHidden]>;
  3831. def mips3 : Flag<["-"], "mips3">,
  3832. Alias<march_EQ>, AliasArgs<["mips3"]>, Group<m_mips_Features_Group>,
  3833. HelpText<"Equivalent to -march=mips3">, Flags<[HelpHidden]>;
  3834. def mips4 : Flag<["-"], "mips4">,
  3835. Alias<march_EQ>, AliasArgs<["mips4"]>, Group<m_mips_Features_Group>,
  3836. HelpText<"Equivalent to -march=mips4">, Flags<[HelpHidden]>;
  3837. def mips5 : Flag<["-"], "mips5">,
  3838. Alias<march_EQ>, AliasArgs<["mips5"]>, Group<m_mips_Features_Group>,
  3839. HelpText<"Equivalent to -march=mips5">, Flags<[HelpHidden]>;
  3840. def mips32 : Flag<["-"], "mips32">,
  3841. Alias<march_EQ>, AliasArgs<["mips32"]>, Group<m_mips_Features_Group>,
  3842. HelpText<"Equivalent to -march=mips32">, Flags<[HelpHidden]>;
  3843. def mips32r2 : Flag<["-"], "mips32r2">,
  3844. Alias<march_EQ>, AliasArgs<["mips32r2"]>, Group<m_mips_Features_Group>,
  3845. HelpText<"Equivalent to -march=mips32r2">, Flags<[HelpHidden]>;
  3846. def mips32r3 : Flag<["-"], "mips32r3">,
  3847. Alias<march_EQ>, AliasArgs<["mips32r3"]>, Group<m_mips_Features_Group>,
  3848. HelpText<"Equivalent to -march=mips32r3">, Flags<[HelpHidden]>;
  3849. def mips32r5 : Flag<["-"], "mips32r5">,
  3850. Alias<march_EQ>, AliasArgs<["mips32r5"]>, Group<m_mips_Features_Group>,
  3851. HelpText<"Equivalent to -march=mips32r5">, Flags<[HelpHidden]>;
  3852. def mips32r6 : Flag<["-"], "mips32r6">,
  3853. Alias<march_EQ>, AliasArgs<["mips32r6"]>, Group<m_mips_Features_Group>,
  3854. HelpText<"Equivalent to -march=mips32r6">, Flags<[HelpHidden]>;
  3855. def mips64 : Flag<["-"], "mips64">,
  3856. Alias<march_EQ>, AliasArgs<["mips64"]>, Group<m_mips_Features_Group>,
  3857. HelpText<"Equivalent to -march=mips64">, Flags<[HelpHidden]>;
  3858. def mips64r2 : Flag<["-"], "mips64r2">,
  3859. Alias<march_EQ>, AliasArgs<["mips64r2"]>, Group<m_mips_Features_Group>,
  3860. HelpText<"Equivalent to -march=mips64r2">, Flags<[HelpHidden]>;
  3861. def mips64r3 : Flag<["-"], "mips64r3">,
  3862. Alias<march_EQ>, AliasArgs<["mips64r3"]>, Group<m_mips_Features_Group>,
  3863. HelpText<"Equivalent to -march=mips64r3">, Flags<[HelpHidden]>;
  3864. def mips64r5 : Flag<["-"], "mips64r5">,
  3865. Alias<march_EQ>, AliasArgs<["mips64r5"]>, Group<m_mips_Features_Group>,
  3866. HelpText<"Equivalent to -march=mips64r5">, Flags<[HelpHidden]>;
  3867. def mips64r6 : Flag<["-"], "mips64r6">,
  3868. Alias<march_EQ>, AliasArgs<["mips64r6"]>, Group<m_mips_Features_Group>,
  3869. HelpText<"Equivalent to -march=mips64r6">, Flags<[HelpHidden]>;
  3870. def mfpxx : Flag<["-"], "mfpxx">, Group<m_mips_Features_Group>,
  3871. HelpText<"Avoid FPU mode dependent operations when used with the O32 ABI">,
  3872. Flags<[HelpHidden]>;
  3873. def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>,
  3874. HelpText<"Enable odd single-precision floating point registers">,
  3875. Flags<[HelpHidden]>;
  3876. def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>,
  3877. HelpText<"Disable odd single-precision floating point registers">,
  3878. Flags<[HelpHidden]>;
  3879. def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">,
  3880. Group<m_mips_Features_Group>,
  3881. HelpText<"Produce relaxation hints for linkers to try optimizing PIC "
  3882. "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
  3883. def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">,
  3884. Group<m_mips_Features_Group>,
  3885. HelpText<"Do not produce relaxation hints for linkers to try optimizing PIC "
  3886. "call sequences into direct calls (MIPS only)">, Flags<[HelpHidden]>;
  3887. def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
  3888. def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>;
  3889. def module_file_info : Flag<["-"], "module-file-info">, Flags<[NoXarchOption,CC1Option]>, Group<Action_Group>,
  3890. HelpText<"Provide information about a particular module file">;
  3891. def mthumb : Flag<["-"], "mthumb">, Group<m_Group>;
  3892. def mtune_EQ : Joined<["-"], "mtune=">, Group<m_Group>,
  3893. HelpText<"Only supported on AArch64, PowerPC, RISC-V, SystemZ, and X86">;
  3894. def multi__module : Flag<["-"], "multi_module">;
  3895. def multiply__defined__unused : Separate<["-"], "multiply_defined_unused">;
  3896. def multiply__defined : Separate<["-"], "multiply_defined">;
  3897. def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Group<m_Group>;
  3898. def canonical_prefixes : Flag<["-"], "canonical-prefixes">, Flags<[HelpHidden, CoreOption]>,
  3899. HelpText<"Use absolute paths for invoking subcommands (default)">;
  3900. def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden, CoreOption]>,
  3901. HelpText<"Use relative paths for invoking subcommands">;
  3902. def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>;
  3903. def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[NoXarchOption]>;
  3904. def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>;
  3905. def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">;
  3906. def nobuiltininc : Flag<["-"], "nobuiltininc">, Flags<[CC1Option, CoreOption]>,
  3907. HelpText<"Disable builtin #include directories">,
  3908. MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseBuiltinIncludes">>;
  3909. def nogpuinc : Flag<["-"], "nogpuinc">, HelpText<"Do not add include paths for CUDA/HIP and"
  3910. " do not include the default CUDA/HIP wrapper headers">;
  3911. def nohipwrapperinc : Flag<["-"], "nohipwrapperinc">,
  3912. HelpText<"Do not include the default HIP wrapper headers and include paths">;
  3913. def : Flag<["-"], "nocudainc">, Alias<nogpuinc>;
  3914. def nogpulib : Flag<["-"], "nogpulib">, MarshallingInfoFlag<LangOpts<"NoGPULib">>,
  3915. Flags<[CC1Option]>, HelpText<"Do not link device library for CUDA/HIP device compilation">;
  3916. def : Flag<["-"], "nocudalib">, Alias<nogpulib>;
  3917. def nodefaultlibs : Flag<["-"], "nodefaultlibs">;
  3918. def nodriverkitlib : Flag<["-"], "nodriverkitlib">;
  3919. def nofixprebinding : Flag<["-"], "nofixprebinding">;
  3920. def nolibc : Flag<["-"], "nolibc">;
  3921. def nomultidefs : Flag<["-"], "nomultidefs">;
  3922. def nopie : Flag<["-"], "nopie">;
  3923. def no_pie : Flag<["-"], "no-pie">, Alias<nopie>;
  3924. def noprebind : Flag<["-"], "noprebind">;
  3925. def noprofilelib : Flag<["-"], "noprofilelib">;
  3926. def noseglinkedit : Flag<["-"], "noseglinkedit">;
  3927. def nostartfiles : Flag<["-"], "nostartfiles">, Group<Link_Group>;
  3928. def nostdinc : Flag<["-"], "nostdinc">, Flags<[CoreOption]>;
  3929. def nostdlibinc : Flag<["-"], "nostdlibinc">;
  3930. def nostdincxx : Flag<["-"], "nostdinc++">, Flags<[CC1Option]>,
  3931. HelpText<"Disable standard #include directories for the C++ standard library">,
  3932. MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardCXXIncludes">>;
  3933. def nostdlib : Flag<["-"], "nostdlib">, Group<Link_Group>;
  3934. def nostdlibxx : Flag<["-"], "nostdlib++">;
  3935. def object : Flag<["-"], "object">;
  3936. def o : JoinedOrSeparate<["-"], "o">, Flags<[NoXarchOption,
  3937. CC1Option, CC1AsOption, FC1Option, FlangOption]>,
  3938. HelpText<"Write output to <file>">, MetaVarName<"<file>">,
  3939. MarshallingInfoString<FrontendOpts<"OutputFile">>;
  3940. def object_file_name_EQ : Joined<["-"], "object-file-name=">, Flags<[CC1Option, CC1AsOption, CoreOption]>,
  3941. HelpText<"Set the output <file> for debug infos">, MetaVarName<"<file>">,
  3942. MarshallingInfoString<CodeGenOpts<"ObjectFilenameForDebug">>;
  3943. def object_file_name : Separate<["-"], "object-file-name">, Flags<[CC1Option, CC1AsOption, CoreOption]>,
  3944. Alias<object_file_name_EQ>;
  3945. def pagezero__size : JoinedOrSeparate<["-"], "pagezero_size">;
  3946. def pass_exit_codes : Flag<["-", "--"], "pass-exit-codes">, Flags<[Unsupported]>;
  3947. def pedantic_errors : Flag<["-", "--"], "pedantic-errors">, Group<pedantic_Group>, Flags<[CC1Option]>,
  3948. MarshallingInfoFlag<DiagnosticOpts<"PedanticErrors">>;
  3949. def pedantic : Flag<["-", "--"], "pedantic">, Group<pedantic_Group>, Flags<[CC1Option,FlangOption,FC1Option]>,
  3950. HelpText<"Warn on language extensions">, MarshallingInfoFlag<DiagnosticOpts<"Pedantic">>;
  3951. def pg : Flag<["-"], "pg">, HelpText<"Enable mcount instrumentation">, Flags<[CC1Option]>,
  3952. MarshallingInfoFlag<CodeGenOpts<"InstrumentForProfiling">>;
  3953. def pipe : Flag<["-", "--"], "pipe">,
  3954. HelpText<"Use pipes between commands, when possible">;
  3955. def prebind__all__twolevel__modules : Flag<["-"], "prebind_all_twolevel_modules">;
  3956. def prebind : Flag<["-"], "prebind">;
  3957. def preload : Flag<["-"], "preload">;
  3958. def print_file_name_EQ : Joined<["-", "--"], "print-file-name=">,
  3959. HelpText<"Print the full library path of <file>">, MetaVarName<"<file>">;
  3960. def print_ivar_layout : Flag<["-"], "print-ivar-layout">, Flags<[CC1Option]>,
  3961. HelpText<"Enable Objective-C Ivar layout bitmap print trace">,
  3962. MarshallingInfoFlag<LangOpts<"ObjCGCBitmapPrint">>;
  3963. def print_libgcc_file_name : Flag<["-", "--"], "print-libgcc-file-name">,
  3964. HelpText<"Print the library path for the currently used compiler runtime "
  3965. "library (\"libgcc.a\" or \"libclang_rt.builtins.*.a\")">;
  3966. def print_multi_directory : Flag<["-", "--"], "print-multi-directory">;
  3967. def print_multi_lib : Flag<["-", "--"], "print-multi-lib">;
  3968. def print_multi_os_directory : Flag<["-", "--"], "print-multi-os-directory">,
  3969. Flags<[Unsupported]>;
  3970. def print_target_triple : Flag<["-", "--"], "print-target-triple">,
  3971. HelpText<"Print the normalized target triple">, Flags<[FlangOption]>;
  3972. def print_effective_triple : Flag<["-", "--"], "print-effective-triple">,
  3973. HelpText<"Print the effective target triple">, Flags<[FlangOption]>;
  3974. // GCC --disable-multiarch, GCC --enable-multiarch (upstream and Debian
  3975. // specific) have different behaviors. We choose not to support the option.
  3976. def : Flag<["-", "--"], "print-multiarch">, Flags<[Unsupported]>;
  3977. def print_prog_name_EQ : Joined<["-", "--"], "print-prog-name=">,
  3978. HelpText<"Print the full program path of <name>">, MetaVarName<"<name>">;
  3979. def print_resource_dir : Flag<["-", "--"], "print-resource-dir">,
  3980. HelpText<"Print the resource directory pathname">;
  3981. def print_search_dirs : Flag<["-", "--"], "print-search-dirs">,
  3982. HelpText<"Print the paths used for finding libraries and programs">;
  3983. def print_targets : Flag<["-", "--"], "print-targets">,
  3984. HelpText<"Print the registered targets">;
  3985. def print_rocm_search_dirs : Flag<["-", "--"], "print-rocm-search-dirs">,
  3986. HelpText<"Print the paths used for finding ROCm installation">;
  3987. def print_runtime_dir : Flag<["-", "--"], "print-runtime-dir">,
  3988. HelpText<"Print the directory pathname containing clangs runtime libraries">;
  3989. def print_diagnostic_options : Flag<["-", "--"], "print-diagnostic-options">,
  3990. HelpText<"Print all of Clang's warning options">;
  3991. def private__bundle : Flag<["-"], "private_bundle">;
  3992. def pthreads : Flag<["-"], "pthreads">;
  3993. defm pthread : BoolOption<"", "pthread",
  3994. LangOpts<"POSIXThreads">, DefaultFalse,
  3995. PosFlag<SetTrue, [], "Support POSIX threads in generated code">,
  3996. NegFlag<SetFalse>, BothFlags<[CC1Option]>>;
  3997. def p : Flag<["-"], "p">;
  3998. def pie : Flag<["-"], "pie">, Group<Link_Group>;
  3999. def static_pie : Flag<["-"], "static-pie">, Group<Link_Group>;
  4000. def read__only__relocs : Separate<["-"], "read_only_relocs">;
  4001. def remap : Flag<["-"], "remap">;
  4002. def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[NoXarchOption,CC1Option]>,
  4003. HelpText<"Rewrite Objective-C source to C++">, Group<Action_Group>;
  4004. def rewrite_legacy_objc : Flag<["-"], "rewrite-legacy-objc">, Flags<[NoXarchOption]>,
  4005. HelpText<"Rewrite Legacy Objective-C source to C++">;
  4006. def rdynamic : Flag<["-"], "rdynamic">, Group<Link_Group>;
  4007. def resource_dir : Separate<["-"], "resource-dir">,
  4008. Flags<[NoXarchOption, CC1Option, CoreOption, HelpHidden]>,
  4009. HelpText<"The directory which holds the compiler resource files">,
  4010. MarshallingInfoString<HeaderSearchOpts<"ResourceDir">>;
  4011. def resource_dir_EQ : Joined<["-"], "resource-dir=">, Flags<[NoXarchOption, CoreOption]>,
  4012. Alias<resource_dir>;
  4013. def rpath : Separate<["-"], "rpath">, Flags<[LinkerInput]>, Group<Link_Group>;
  4014. def rtlib_EQ : Joined<["-", "--"], "rtlib=">,
  4015. HelpText<"Compiler runtime library to use">;
  4016. def frtlib_add_rpath: Flag<["-"], "frtlib-add-rpath">, Flags<[NoArgumentUnused]>,
  4017. HelpText<"Add -rpath with architecture-specific resource directory to the linker flags">;
  4018. def fno_rtlib_add_rpath: Flag<["-"], "fno-rtlib-add-rpath">, Flags<[NoArgumentUnused]>,
  4019. HelpText<"Do not add -rpath with architecture-specific resource directory to the linker flags">;
  4020. def offload_add_rpath: Flag<["--"], "offload-add-rpath">, Flags<[NoArgumentUnused]>,
  4021. HelpText<"Add -rpath with HIP runtime library directory to the linker flags">;
  4022. def no_offload_add_rpath: Flag<["--"], "no-offload-add-rpath">, Flags<[NoArgumentUnused]>,
  4023. HelpText<"Do not add -rpath with HIP runtime library directory to the linker flags">;
  4024. defm openmp_implicit_rpath: BoolFOption<"openmp-implicit-rpath",
  4025. LangOpts<"OpenMP">,
  4026. DefaultTrue,
  4027. PosFlag<SetTrue, [], "Set rpath on OpenMP executables">,
  4028. NegFlag<SetFalse>,
  4029. BothFlags<[NoArgumentUnused]>>;
  4030. def r : Flag<["-"], "r">, Flags<[LinkerInput,NoArgumentUnused]>,
  4031. Group<Link_Group>;
  4032. def save_temps_EQ : Joined<["-", "--"], "save-temps=">, Flags<[CC1Option, FlangOption, NoXarchOption]>,
  4033. HelpText<"Save intermediate compilation results.">;
  4034. def save_temps : Flag<["-", "--"], "save-temps">, Flags<[FlangOption, NoXarchOption]>,
  4035. Alias<save_temps_EQ>, AliasArgs<["cwd"]>,
  4036. HelpText<"Save intermediate compilation results">;
  4037. def save_stats_EQ : Joined<["-", "--"], "save-stats=">, Flags<[NoXarchOption]>,
  4038. HelpText<"Save llvm statistics.">;
  4039. def save_stats : Flag<["-", "--"], "save-stats">, Flags<[NoXarchOption]>,
  4040. Alias<save_stats_EQ>, AliasArgs<["cwd"]>,
  4041. HelpText<"Save llvm statistics.">;
  4042. def via_file_asm : Flag<["-", "--"], "via-file-asm">, InternalDebugOpt,
  4043. HelpText<"Write assembly to file for input to assemble jobs">;
  4044. def sectalign : MultiArg<["-"], "sectalign", 3>;
  4045. def sectcreate : MultiArg<["-"], "sectcreate", 3>;
  4046. def sectobjectsymbols : MultiArg<["-"], "sectobjectsymbols", 2>;
  4047. def sectorder : MultiArg<["-"], "sectorder", 3>;
  4048. def seg1addr : JoinedOrSeparate<["-"], "seg1addr">;
  4049. def seg__addr__table__filename : Separate<["-"], "seg_addr_table_filename">;
  4050. def seg__addr__table : Separate<["-"], "seg_addr_table">;
  4051. def segaddr : MultiArg<["-"], "segaddr", 2>;
  4052. def segcreate : MultiArg<["-"], "segcreate", 3>;
  4053. def seglinkedit : Flag<["-"], "seglinkedit">;
  4054. def segprot : MultiArg<["-"], "segprot", 3>;
  4055. def segs__read__only__addr : Separate<["-"], "segs_read_only_addr">;
  4056. def segs__read__write__addr : Separate<["-"], "segs_read_write_addr">;
  4057. def segs__read__ : Joined<["-"], "segs_read_">;
  4058. def shared_libgcc : Flag<["-"], "shared-libgcc">;
  4059. def shared : Flag<["-", "--"], "shared">, Group<Link_Group>;
  4060. def single__module : Flag<["-"], "single_module">;
  4061. def specs_EQ : Joined<["-", "--"], "specs=">, Group<Link_Group>;
  4062. def specs : Separate<["-", "--"], "specs">, Flags<[Unsupported]>;
  4063. def start_no_unused_arguments : Flag<["--"], "start-no-unused-arguments">, Flags<[CoreOption]>,
  4064. HelpText<"Don't emit warnings about unused arguments for the following arguments">;
  4065. def static_libgcc : Flag<["-"], "static-libgcc">;
  4066. def static_libstdcxx : Flag<["-"], "static-libstdc++">;
  4067. def static : Flag<["-", "--"], "static">, Group<Link_Group>, Flags<[NoArgumentUnused]>;
  4068. def std_default_EQ : Joined<["-"], "std-default=">;
  4069. def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option,FlangOption,FC1Option]>,
  4070. Group<CompileOnly_Group>, HelpText<"Language standard to compile for">,
  4071. ValuesCode<[{
  4072. static constexpr const char VALUES_CODE [] =
  4073. #define LANGSTANDARD(id, name, lang, desc, features) name ","
  4074. #define LANGSTANDARD_ALIAS(id, alias) alias ","
  4075. #include "clang/Basic/LangStandards.def"
  4076. ;
  4077. }]>;
  4078. def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>,
  4079. HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">;
  4080. def stdlibxx_isystem : JoinedOrSeparate<["-"], "stdlib++-isystem">,
  4081. Group<clang_i_Group>,
  4082. HelpText<"Use directory as the C++ standard library include path">,
  4083. Flags<[NoXarchOption]>, MetaVarName<"<directory>">;
  4084. def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>,
  4085. HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">;
  4086. def sub__library : JoinedOrSeparate<["-"], "sub_library">;
  4087. def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">;
  4088. def system_header_prefix : Joined<["--"], "system-header-prefix=">,
  4089. Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
  4090. HelpText<"Treat all #include paths starting with <prefix> as including a "
  4091. "system header.">;
  4092. def : Separate<["--"], "system-header-prefix">, Alias<system_header_prefix>;
  4093. def no_system_header_prefix : Joined<["--"], "no-system-header-prefix=">,
  4094. Group<clang_i_Group>, Flags<[CC1Option]>, MetaVarName<"<prefix>">,
  4095. HelpText<"Treat all #include paths starting with <prefix> as not including a "
  4096. "system header.">;
  4097. def : Separate<["--"], "no-system-header-prefix">, Alias<no_system_header_prefix>;
  4098. def s : Flag<["-"], "s">, Group<Link_Group>;
  4099. def target : Joined<["--"], "target=">, Flags<[NoXarchOption, CoreOption, FlangOption]>,
  4100. HelpText<"Generate code for the given target">;
  4101. def darwin_target_variant : Separate<["-"], "darwin-target-variant">,
  4102. Flags<[NoXarchOption, CoreOption]>,
  4103. HelpText<"Generate code for an additional runtime variant of the deployment target">;
  4104. def print_supported_cpus : Flag<["-", "--"], "print-supported-cpus">,
  4105. Group<CompileOnly_Group>, Flags<[CC1Option, CoreOption]>,
  4106. HelpText<"Print supported cpu models for the given target (if target is not specified,"
  4107. " it will print the supported cpus for the default target)">,
  4108. MarshallingInfoFlag<FrontendOpts<"PrintSupportedCPUs">>;
  4109. def mcpu_EQ_QUESTION : Flag<["-"], "mcpu=?">, Alias<print_supported_cpus>;
  4110. def mtune_EQ_QUESTION : Flag<["-"], "mtune=?">, Alias<print_supported_cpus>;
  4111. def time : Flag<["-"], "time">,
  4112. HelpText<"Time individual commands">;
  4113. def traditional_cpp : Flag<["-", "--"], "traditional-cpp">, Flags<[CC1Option]>,
  4114. HelpText<"Enable some traditional CPP emulation">,
  4115. MarshallingInfoFlag<LangOpts<"TraditionalCPP">>;
  4116. def traditional : Flag<["-", "--"], "traditional">;
  4117. def trigraphs : Flag<["-", "--"], "trigraphs">, Alias<ftrigraphs>,
  4118. HelpText<"Process trigraph sequences">;
  4119. def twolevel__namespace__hints : Flag<["-"], "twolevel_namespace_hints">;
  4120. def twolevel__namespace : Flag<["-"], "twolevel_namespace">;
  4121. def t : Flag<["-"], "t">, Group<Link_Group>;
  4122. def umbrella : Separate<["-"], "umbrella">;
  4123. def undefined : JoinedOrSeparate<["-"], "undefined">, Group<u_Group>;
  4124. def undef : Flag<["-"], "undef">, Group<u_Group>, Flags<[CC1Option]>,
  4125. HelpText<"undef all system defines">,
  4126. MarshallingInfoNegativeFlag<PreprocessorOpts<"UsePredefines">>;
  4127. def unexported__symbols__list : Separate<["-"], "unexported_symbols_list">;
  4128. def u : JoinedOrSeparate<["-"], "u">, Group<u_Group>;
  4129. def v : Flag<["-"], "v">, Flags<[CC1Option, CoreOption]>,
  4130. HelpText<"Show commands to run and use verbose output">,
  4131. MarshallingInfoFlag<HeaderSearchOpts<"Verbose">>;
  4132. def altivec_src_compat : Joined<["-"], "faltivec-src-compat=">,
  4133. Flags<[CC1Option]>, Group<f_Group>,
  4134. HelpText<"Source-level compatibility for Altivec vectors (for PowerPC "
  4135. "targets). This includes results of vector comparison (scalar for "
  4136. "'xl', vector for 'gcc') as well as behavior when initializing with "
  4137. "a scalar (splatting for 'xl', element zero only for 'gcc'). For "
  4138. "'mixed', the compatibility is as 'gcc' for 'vector bool/vector "
  4139. "pixel' and as 'xl' for other types. Current default is 'mixed'.">,
  4140. Values<"mixed,gcc,xl">,
  4141. NormalizedValuesScope<"LangOptions::AltivecSrcCompatKind">,
  4142. NormalizedValues<["Mixed", "GCC", "XL"]>,
  4143. MarshallingInfoEnum<LangOpts<"AltivecSrcCompat">, "Mixed">;
  4144. def verify_debug_info : Flag<["--"], "verify-debug-info">, Flags<[NoXarchOption]>,
  4145. HelpText<"Verify the binary representation of debug output">;
  4146. def weak_l : Joined<["-"], "weak-l">, Flags<[LinkerInput]>;
  4147. def weak__framework : Separate<["-"], "weak_framework">, Flags<[LinkerInput]>;
  4148. def weak__library : Separate<["-"], "weak_library">, Flags<[LinkerInput]>;
  4149. def weak__reference__mismatches : Separate<["-"], "weak_reference_mismatches">;
  4150. def whatsloaded : Flag<["-"], "whatsloaded">;
  4151. def why_load : Flag<["-"], "why_load">;
  4152. def whyload : Flag<["-"], "whyload">, Alias<why_load>;
  4153. def w : Flag<["-"], "w">, HelpText<"Suppress all warnings">, Flags<[CC1Option]>,
  4154. MarshallingInfoFlag<DiagnosticOpts<"IgnoreWarnings">>;
  4155. def x : JoinedOrSeparate<["-"], "x">,
  4156. Flags<[NoXarchOption,CC1Option,FlangOption,FC1Option]>,
  4157. HelpText<"Treat subsequent input files as having type <language>">,
  4158. MetaVarName<"<language>">;
  4159. def y : Joined<["-"], "y">;
  4160. defm integrated_as : BoolFOption<"integrated-as",
  4161. CodeGenOpts<"DisableIntegratedAS">, DefaultFalse,
  4162. NegFlag<SetTrue, [CC1Option, FlangOption], "Disable">, PosFlag<SetFalse, [], "Enable">,
  4163. BothFlags<[], " the integrated assembler">>;
  4164. def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">,
  4165. Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
  4166. HelpText<"Run cc1 in-process">;
  4167. def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">,
  4168. Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
  4169. HelpText<"Spawn a separate process for each cc1">;
  4170. def fintegrated_objemitter : Flag<["-"], "fintegrated-objemitter">,
  4171. Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
  4172. HelpText<"Use internal machine object code emitter.">;
  4173. def fno_integrated_objemitter : Flag<["-"], "fno-integrated-objemitter">,
  4174. Flags<[CoreOption, NoXarchOption]>, Group<f_Group>,
  4175. HelpText<"Use external machine object code emitter.">;
  4176. def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[NoXarchOption]>;
  4177. def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>,
  4178. Flags<[CC1Option, FlangOption, NoXarchOption]>;
  4179. def working_directory : Separate<["-"], "working-directory">, Flags<[CC1Option]>,
  4180. HelpText<"Resolve file paths relative to the specified directory">,
  4181. MarshallingInfoString<FileSystemOpts<"WorkingDir">>;
  4182. def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>,
  4183. Alias<working_directory>;
  4184. // Double dash options, which are usually an alias for one of the previous
  4185. // options.
  4186. def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>;
  4187. def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>;
  4188. def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>;
  4189. def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>;
  4190. def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>;
  4191. def _analyzer_no_default_checks : Flag<["--"], "analyzer-no-default-checks">, Flags<[NoXarchOption]>;
  4192. def _analyzer_output : JoinedOrSeparate<["--"], "analyzer-output">, Flags<[NoXarchOption]>,
  4193. HelpText<"Static analyzer report output format (html|plist|plist-multi-file|plist-html|sarif|sarif-html|text).">;
  4194. def _analyze : Flag<["--"], "analyze">, Flags<[NoXarchOption, CoreOption]>,
  4195. HelpText<"Run the static analyzer">;
  4196. def _assemble : Flag<["--"], "assemble">, Alias<S>;
  4197. def _assert_EQ : Joined<["--"], "assert=">, Alias<A>;
  4198. def _assert : Separate<["--"], "assert">, Alias<A>;
  4199. def _bootclasspath_EQ : Joined<["--"], "bootclasspath=">, Alias<fbootclasspath_EQ>;
  4200. def _bootclasspath : Separate<["--"], "bootclasspath">, Alias<fbootclasspath_EQ>;
  4201. def _classpath_EQ : Joined<["--"], "classpath=">, Alias<fclasspath_EQ>;
  4202. def _classpath : Separate<["--"], "classpath">, Alias<fclasspath_EQ>;
  4203. def _comments_in_macros : Flag<["--"], "comments-in-macros">, Alias<CC>;
  4204. def _comments : Flag<["--"], "comments">, Alias<C>;
  4205. def _compile : Flag<["--"], "compile">, Alias<c>;
  4206. def _constant_cfstrings : Flag<["--"], "constant-cfstrings">;
  4207. def _debug_EQ : Joined<["--"], "debug=">, Alias<g_Flag>;
  4208. def _debug : Flag<["--"], "debug">, Alias<g_Flag>;
  4209. def _define_macro_EQ : Joined<["--"], "define-macro=">, Alias<D>;
  4210. def _define_macro : Separate<["--"], "define-macro">, Alias<D>;
  4211. def _dependencies : Flag<["--"], "dependencies">, Alias<M>;
  4212. def _dyld_prefix_EQ : Joined<["--"], "dyld-prefix=">;
  4213. def _dyld_prefix : Separate<["--"], "dyld-prefix">, Alias<_dyld_prefix_EQ>;
  4214. def _encoding_EQ : Joined<["--"], "encoding=">, Alias<fencoding_EQ>;
  4215. def _encoding : Separate<["--"], "encoding">, Alias<fencoding_EQ>;
  4216. def _entry : Flag<["--"], "entry">, Alias<e>;
  4217. def _extdirs_EQ : Joined<["--"], "extdirs=">, Alias<fextdirs_EQ>;
  4218. def _extdirs : Separate<["--"], "extdirs">, Alias<fextdirs_EQ>;
  4219. def _extra_warnings : Flag<["--"], "extra-warnings">, Alias<W_Joined>;
  4220. def _for_linker_EQ : Joined<["--"], "for-linker=">, Alias<Xlinker>;
  4221. def _for_linker : Separate<["--"], "for-linker">, Alias<Xlinker>;
  4222. def _force_link_EQ : Joined<["--"], "force-link=">, Alias<u>;
  4223. def _force_link : Separate<["--"], "force-link">, Alias<u>;
  4224. def _help_hidden : Flag<["--"], "help-hidden">,
  4225. HelpText<"Display help for hidden options">;
  4226. def _imacros_EQ : Joined<["--"], "imacros=">, Alias<imacros>;
  4227. def _include_barrier : Flag<["--"], "include-barrier">, Alias<I_>;
  4228. def _include_directory_after_EQ : Joined<["--"], "include-directory-after=">, Alias<idirafter>;
  4229. def _include_directory_after : Separate<["--"], "include-directory-after">, Alias<idirafter>;
  4230. def _include_directory_EQ : Joined<["--"], "include-directory=">, Alias<I>;
  4231. def _include_directory : Separate<["--"], "include-directory">, Alias<I>;
  4232. def _include_prefix_EQ : Joined<["--"], "include-prefix=">, Alias<iprefix>;
  4233. def _include_prefix : Separate<["--"], "include-prefix">, Alias<iprefix>;
  4234. def _include_with_prefix_after_EQ : Joined<["--"], "include-with-prefix-after=">, Alias<iwithprefix>;
  4235. def _include_with_prefix_after : Separate<["--"], "include-with-prefix-after">, Alias<iwithprefix>;
  4236. def _include_with_prefix_before_EQ : Joined<["--"], "include-with-prefix-before=">, Alias<iwithprefixbefore>;
  4237. def _include_with_prefix_before : Separate<["--"], "include-with-prefix-before">, Alias<iwithprefixbefore>;
  4238. def _include_with_prefix_EQ : Joined<["--"], "include-with-prefix=">, Alias<iwithprefix>;
  4239. def _include_with_prefix : Separate<["--"], "include-with-prefix">, Alias<iwithprefix>;
  4240. def _include_EQ : Joined<["--"], "include=">, Alias<include_>;
  4241. def _language_EQ : Joined<["--"], "language=">, Alias<x>;
  4242. def _language : Separate<["--"], "language">, Alias<x>;
  4243. def _library_directory_EQ : Joined<["--"], "library-directory=">, Alias<L>;
  4244. def _library_directory : Separate<["--"], "library-directory">, Alias<L>;
  4245. def _no_line_commands : Flag<["--"], "no-line-commands">, Alias<P>;
  4246. def _no_standard_includes : Flag<["--"], "no-standard-includes">, Alias<nostdinc>;
  4247. def _no_standard_libraries : Flag<["--"], "no-standard-libraries">, Alias<nostdlib>;
  4248. def _no_undefined : Flag<["--"], "no-undefined">, Flags<[LinkerInput]>;
  4249. def _no_warnings : Flag<["--"], "no-warnings">, Alias<w>;
  4250. def _optimize_EQ : Joined<["--"], "optimize=">, Alias<O>;
  4251. def _optimize : Flag<["--"], "optimize">, Alias<O>;
  4252. def _output_class_directory_EQ : Joined<["--"], "output-class-directory=">, Alias<foutput_class_dir_EQ>;
  4253. def _output_class_directory : Separate<["--"], "output-class-directory">, Alias<foutput_class_dir_EQ>;
  4254. def _output_EQ : Joined<["--"], "output=">, Alias<o>;
  4255. def _output : Separate<["--"], "output">, Alias<o>;
  4256. def _param : Separate<["--"], "param">, Group<CompileOnly_Group>;
  4257. def _param_EQ : Joined<["--"], "param=">, Alias<_param>;
  4258. def _precompile : Flag<["--"], "precompile">, Flags<[NoXarchOption]>,
  4259. Group<Action_Group>, HelpText<"Only precompile the input">;
  4260. def _prefix_EQ : Joined<["--"], "prefix=">, Alias<B>;
  4261. def _prefix : Separate<["--"], "prefix">, Alias<B>;
  4262. def _preprocess : Flag<["--"], "preprocess">, Alias<E>;
  4263. def _print_diagnostic_categories : Flag<["--"], "print-diagnostic-categories">;
  4264. def _print_file_name : Separate<["--"], "print-file-name">, Alias<print_file_name_EQ>;
  4265. def _print_missing_file_dependencies : Flag<["--"], "print-missing-file-dependencies">, Alias<MG>;
  4266. def _print_prog_name : Separate<["--"], "print-prog-name">, Alias<print_prog_name_EQ>;
  4267. def _profile : Flag<["--"], "profile">, Alias<p>;
  4268. def _resource_EQ : Joined<["--"], "resource=">, Alias<fcompile_resource_EQ>;
  4269. def _resource : Separate<["--"], "resource">, Alias<fcompile_resource_EQ>;
  4270. def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>;
  4271. def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[NoXarchOption]>,
  4272. HelpText<"Serialize compiler diagnostics to a file">;
  4273. // We give --version different semantics from -version.
  4274. def _version : Flag<["--"], "version">,
  4275. Flags<[CoreOption, FlangOption]>,
  4276. HelpText<"Print version information">;
  4277. def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>;
  4278. def _std : Separate<["--"], "std">, Alias<std_EQ>;
  4279. def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>;
  4280. def _sysroot_EQ : Joined<["--"], "sysroot=">;
  4281. def _sysroot : Separate<["--"], "sysroot">, Alias<_sysroot_EQ>;
  4282. def _target_help : Flag<["--"], "target-help">;
  4283. def _trace_includes : Flag<["--"], "trace-includes">, Alias<H>;
  4284. def _undefine_macro_EQ : Joined<["--"], "undefine-macro=">, Alias<U>;
  4285. def _undefine_macro : Separate<["--"], "undefine-macro">, Alias<U>;
  4286. def _unsigned_char : Flag<["--"], "unsigned-char">, Alias<funsigned_char>;
  4287. def _user_dependencies : Flag<["--"], "user-dependencies">, Alias<MM>;
  4288. def _verbose : Flag<["--"], "verbose">, Alias<v>;
  4289. def _warn__EQ : Joined<["--"], "warn-=">, Alias<W_Joined>;
  4290. def _warn_ : Joined<["--"], "warn-">, Alias<W_Joined>;
  4291. def _write_dependencies : Flag<["--"], "write-dependencies">, Alias<MD>;
  4292. def _write_user_dependencies : Flag<["--"], "write-user-dependencies">, Alias<MMD>;
  4293. def _ : Joined<["--"], "">, Flags<[Unsupported]>;
  4294. // Hexagon feature flags.
  4295. def mieee_rnd_near : Flag<["-"], "mieee-rnd-near">,
  4296. Group<m_hexagon_Features_Group>;
  4297. def mv5 : Flag<["-"], "mv5">, Group<m_hexagon_Features_Group>, Alias<mcpu_EQ>,
  4298. AliasArgs<["hexagonv5"]>;
  4299. def mv55 : Flag<["-"], "mv55">, Group<m_hexagon_Features_Group>,
  4300. Alias<mcpu_EQ>, AliasArgs<["hexagonv55"]>;
  4301. def mv60 : Flag<["-"], "mv60">, Group<m_hexagon_Features_Group>,
  4302. Alias<mcpu_EQ>, AliasArgs<["hexagonv60"]>;
  4303. def mv62 : Flag<["-"], "mv62">, Group<m_hexagon_Features_Group>,
  4304. Alias<mcpu_EQ>, AliasArgs<["hexagonv62"]>;
  4305. def mv65 : Flag<["-"], "mv65">, Group<m_hexagon_Features_Group>,
  4306. Alias<mcpu_EQ>, AliasArgs<["hexagonv65"]>;
  4307. def mv66 : Flag<["-"], "mv66">, Group<m_hexagon_Features_Group>,
  4308. Alias<mcpu_EQ>, AliasArgs<["hexagonv66"]>;
  4309. def mv67 : Flag<["-"], "mv67">, Group<m_hexagon_Features_Group>,
  4310. Alias<mcpu_EQ>, AliasArgs<["hexagonv67"]>;
  4311. def mv67t : Flag<["-"], "mv67t">, Group<m_hexagon_Features_Group>,
  4312. Alias<mcpu_EQ>, AliasArgs<["hexagonv67t"]>;
  4313. def mv68 : Flag<["-"], "mv68">, Group<m_hexagon_Features_Group>,
  4314. Alias<mcpu_EQ>, AliasArgs<["hexagonv68"]>;
  4315. def mv69 : Flag<["-"], "mv69">, Group<m_hexagon_Features_Group>,
  4316. Alias<mcpu_EQ>, AliasArgs<["hexagonv69"]>;
  4317. def mv71 : Flag<["-"], "mv71">, Group<m_hexagon_Features_Group>,
  4318. Alias<mcpu_EQ>, AliasArgs<["hexagonv71"]>;
  4319. def mv71t : Flag<["-"], "mv71t">, Group<m_hexagon_Features_Group>,
  4320. Alias<mcpu_EQ>, AliasArgs<["hexagonv71t"]>;
  4321. def mv73 : Flag<["-"], "mv73">, Group<m_hexagon_Features_Group>,
  4322. Alias<mcpu_EQ>, AliasArgs<["hexagonv73"]>;
  4323. def mhexagon_hvx : Flag<["-"], "mhvx">, Group<m_hexagon_Features_HVX_Group>,
  4324. HelpText<"Enable Hexagon Vector eXtensions">;
  4325. def mhexagon_hvx_EQ : Joined<["-"], "mhvx=">,
  4326. Group<m_hexagon_Features_HVX_Group>,
  4327. HelpText<"Enable Hexagon Vector eXtensions">;
  4328. def mno_hexagon_hvx : Flag<["-"], "mno-hvx">,
  4329. Group<m_hexagon_Features_HVX_Group>,
  4330. HelpText<"Disable Hexagon Vector eXtensions">;
  4331. def mhexagon_hvx_length_EQ : Joined<["-"], "mhvx-length=">,
  4332. Group<m_hexagon_Features_HVX_Group>, HelpText<"Set Hexagon Vector Length">,
  4333. Values<"64B,128B">;
  4334. def mhexagon_hvx_qfloat : Flag<["-"], "mhvx-qfloat">,
  4335. Group<m_hexagon_Features_HVX_Group>,
  4336. HelpText<"Enable Hexagon HVX QFloat instructions">;
  4337. def mno_hexagon_hvx_qfloat : Flag<["-"], "mno-hvx-qfloat">,
  4338. Group<m_hexagon_Features_HVX_Group>,
  4339. HelpText<"Disable Hexagon HVX QFloat instructions">;
  4340. def mhexagon_hvx_ieee_fp : Flag<["-"], "mhvx-ieee-fp">,
  4341. Group<m_hexagon_Features_Group>,
  4342. HelpText<"Enable Hexagon HVX IEEE floating-point">;
  4343. def mno_hexagon_hvx_ieee_fp : Flag<["-"], "mno-hvx-ieee-fp">,
  4344. Group<m_hexagon_Features_Group>,
  4345. HelpText<"Disable Hexagon HVX IEEE floating-point">;
  4346. def ffixed_r19: Flag<["-"], "ffixed-r19">,
  4347. HelpText<"Reserve register r19 (Hexagon only)">;
  4348. def mmemops : Flag<["-"], "mmemops">, Group<m_hexagon_Features_Group>,
  4349. Flags<[CC1Option]>, HelpText<"Enable generation of memop instructions">;
  4350. def mno_memops : Flag<["-"], "mno-memops">, Group<m_hexagon_Features_Group>,
  4351. Flags<[CC1Option]>, HelpText<"Disable generation of memop instructions">;
  4352. def mpackets : Flag<["-"], "mpackets">, Group<m_hexagon_Features_Group>,
  4353. Flags<[CC1Option]>, HelpText<"Enable generation of instruction packets">;
  4354. def mno_packets : Flag<["-"], "mno-packets">, Group<m_hexagon_Features_Group>,
  4355. Flags<[CC1Option]>, HelpText<"Disable generation of instruction packets">;
  4356. def mnvj : Flag<["-"], "mnvj">, Group<m_hexagon_Features_Group>,
  4357. Flags<[CC1Option]>, HelpText<"Enable generation of new-value jumps">;
  4358. def mno_nvj : Flag<["-"], "mno-nvj">, Group<m_hexagon_Features_Group>,
  4359. Flags<[CC1Option]>, HelpText<"Disable generation of new-value jumps">;
  4360. def mnvs : Flag<["-"], "mnvs">, Group<m_hexagon_Features_Group>,
  4361. Flags<[CC1Option]>, HelpText<"Enable generation of new-value stores">;
  4362. def mno_nvs : Flag<["-"], "mno-nvs">, Group<m_hexagon_Features_Group>,
  4363. Flags<[CC1Option]>, HelpText<"Disable generation of new-value stores">;
  4364. def mcabac: Flag<["-"], "mcabac">, Group<m_hexagon_Features_Group>,
  4365. HelpText<"Enable CABAC instructions">;
  4366. // SPARC feature flags
  4367. def mfpu : Flag<["-"], "mfpu">, Group<m_sparc_Features_Group>;
  4368. def mno_fpu : Flag<["-"], "mno-fpu">, Group<m_sparc_Features_Group>;
  4369. def mfsmuld : Flag<["-"], "mfsmuld">, Group<m_sparc_Features_Group>;
  4370. def mno_fsmuld : Flag<["-"], "mno-fsmuld">, Group<m_sparc_Features_Group>;
  4371. def mpopc : Flag<["-"], "mpopc">, Group<m_sparc_Features_Group>;
  4372. def mno_popc : Flag<["-"], "mno-popc">, Group<m_sparc_Features_Group>;
  4373. def mvis : Flag<["-"], "mvis">, Group<m_sparc_Features_Group>;
  4374. def mno_vis : Flag<["-"], "mno-vis">, Group<m_sparc_Features_Group>;
  4375. def mvis2 : Flag<["-"], "mvis2">, Group<m_sparc_Features_Group>;
  4376. def mno_vis2 : Flag<["-"], "mno-vis2">, Group<m_sparc_Features_Group>;
  4377. def mvis3 : Flag<["-"], "mvis3">, Group<m_sparc_Features_Group>;
  4378. def mno_vis3 : Flag<["-"], "mno-vis3">, Group<m_sparc_Features_Group>;
  4379. def mhard_quad_float : Flag<["-"], "mhard-quad-float">, Group<m_sparc_Features_Group>;
  4380. def msoft_quad_float : Flag<["-"], "msoft-quad-float">, Group<m_sparc_Features_Group>;
  4381. // M68k features flags
  4382. def m68000 : Flag<["-"], "m68000">, Group<m_m68k_Features_Group>;
  4383. def m68010 : Flag<["-"], "m68010">, Group<m_m68k_Features_Group>;
  4384. def m68020 : Flag<["-"], "m68020">, Group<m_m68k_Features_Group>;
  4385. def m68030 : Flag<["-"], "m68030">, Group<m_m68k_Features_Group>;
  4386. def m68040 : Flag<["-"], "m68040">, Group<m_m68k_Features_Group>;
  4387. def m68060 : Flag<["-"], "m68060">, Group<m_m68k_Features_Group>;
  4388. foreach i = {0-6} in
  4389. def ffixed_a#i : Flag<["-"], "ffixed-a"#i>, Group<m_m68k_Features_Group>,
  4390. HelpText<"Reserve the a"#i#" register (M68k only)">;
  4391. foreach i = {0-7} in
  4392. def ffixed_d#i : Flag<["-"], "ffixed-d"#i>, Group<m_m68k_Features_Group>,
  4393. HelpText<"Reserve the d"#i#" register (M68k only)">;
  4394. // X86 feature flags
  4395. def mx87 : Flag<["-"], "mx87">, Group<m_x86_Features_Group>;
  4396. def mno_x87 : Flag<["-"], "mno-x87">, Group<m_x86_Features_Group>;
  4397. def m80387 : Flag<["-"], "m80387">, Alias<mx87>;
  4398. def mno_80387 : Flag<["-"], "mno-80387">, Alias<mno_x87>;
  4399. def mno_fp_ret_in_387 : Flag<["-"], "mno-fp-ret-in-387">, Alias<mno_x87>;
  4400. def mmmx : Flag<["-"], "mmmx">, Group<m_x86_Features_Group>;
  4401. def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>;
  4402. def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>;
  4403. def mno_3dnow : Flag<["-"], "mno-3dnow">, Group<m_x86_Features_Group>;
  4404. def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>;
  4405. def mno_3dnowa : Flag<["-"], "mno-3dnowa">, Group<m_x86_Features_Group>;
  4406. def mamx_bf16 : Flag<["-"], "mamx-bf16">, Group<m_x86_Features_Group>;
  4407. def mno_amx_bf16 : Flag<["-"], "mno-amx-bf16">, Group<m_x86_Features_Group>;
  4408. def mamx_fp16 : Flag<["-"], "mamx-fp16">, Group<m_x86_Features_Group>;
  4409. def mno_amx_fp16 : Flag<["-"], "mno-amx-fp16">, Group<m_x86_Features_Group>;
  4410. def mamx_int8 : Flag<["-"], "mamx-int8">, Group<m_x86_Features_Group>;
  4411. def mno_amx_int8 : Flag<["-"], "mno-amx-int8">, Group<m_x86_Features_Group>;
  4412. def mamx_tile : Flag<["-"], "mamx-tile">, Group<m_x86_Features_Group>;
  4413. def mno_amx_tile : Flag<["-"], "mno-amx-tile">, Group<m_x86_Features_Group>;
  4414. def mcmpccxadd : Flag<["-"], "mcmpccxadd">, Group<m_x86_Features_Group>;
  4415. def mno_cmpccxadd : Flag<["-"], "mno-cmpccxadd">, Group<m_x86_Features_Group>;
  4416. def msse : Flag<["-"], "msse">, Group<m_x86_Features_Group>;
  4417. def mno_sse : Flag<["-"], "mno-sse">, Group<m_x86_Features_Group>;
  4418. def msse2 : Flag<["-"], "msse2">, Group<m_x86_Features_Group>;
  4419. def mno_sse2 : Flag<["-"], "mno-sse2">, Group<m_x86_Features_Group>;
  4420. def msse3 : Flag<["-"], "msse3">, Group<m_x86_Features_Group>;
  4421. def mno_sse3 : Flag<["-"], "mno-sse3">, Group<m_x86_Features_Group>;
  4422. def mssse3 : Flag<["-"], "mssse3">, Group<m_x86_Features_Group>;
  4423. def mno_ssse3 : Flag<["-"], "mno-ssse3">, Group<m_x86_Features_Group>;
  4424. def msse4_1 : Flag<["-"], "msse4.1">, Group<m_x86_Features_Group>;
  4425. def mno_sse4_1 : Flag<["-"], "mno-sse4.1">, Group<m_x86_Features_Group>;
  4426. def msse4_2 : Flag<["-"], "msse4.2">, Group<m_x86_Features_Group>;
  4427. def mno_sse4_2 : Flag<["-"], "mno-sse4.2">, Group<m_x86_Features_Group>;
  4428. def msse4 : Flag<["-"], "msse4">, Alias<msse4_2>;
  4429. // -mno-sse4 turns off sse4.1 which has the effect of turning off everything
  4430. // later than 4.1. -msse4 turns on 4.2 which has the effect of turning on
  4431. // everything earlier than 4.2.
  4432. def mno_sse4 : Flag<["-"], "mno-sse4">, Alias<mno_sse4_1>;
  4433. def msse4a : Flag<["-"], "msse4a">, Group<m_x86_Features_Group>;
  4434. def mno_sse4a : Flag<["-"], "mno-sse4a">, Group<m_x86_Features_Group>;
  4435. def mavx : Flag<["-"], "mavx">, Group<m_x86_Features_Group>;
  4436. def mno_avx : Flag<["-"], "mno-avx">, Group<m_x86_Features_Group>;
  4437. def mavx2 : Flag<["-"], "mavx2">, Group<m_x86_Features_Group>;
  4438. def mno_avx2 : Flag<["-"], "mno-avx2">, Group<m_x86_Features_Group>;
  4439. def mavx512f : Flag<["-"], "mavx512f">, Group<m_x86_Features_Group>;
  4440. def mno_avx512f : Flag<["-"], "mno-avx512f">, Group<m_x86_Features_Group>;
  4441. def mavx512bf16 : Flag<["-"], "mavx512bf16">, Group<m_x86_Features_Group>;
  4442. def mno_avx512bf16 : Flag<["-"], "mno-avx512bf16">, Group<m_x86_Features_Group>;
  4443. def mavx512bitalg : Flag<["-"], "mavx512bitalg">, Group<m_x86_Features_Group>;
  4444. def mno_avx512bitalg : Flag<["-"], "mno-avx512bitalg">, Group<m_x86_Features_Group>;
  4445. def mavx512bw : Flag<["-"], "mavx512bw">, Group<m_x86_Features_Group>;
  4446. def mno_avx512bw : Flag<["-"], "mno-avx512bw">, Group<m_x86_Features_Group>;
  4447. def mavx512cd : Flag<["-"], "mavx512cd">, Group<m_x86_Features_Group>;
  4448. def mno_avx512cd : Flag<["-"], "mno-avx512cd">, Group<m_x86_Features_Group>;
  4449. def mavx512dq : Flag<["-"], "mavx512dq">, Group<m_x86_Features_Group>;
  4450. def mno_avx512dq : Flag<["-"], "mno-avx512dq">, Group<m_x86_Features_Group>;
  4451. def mavx512er : Flag<["-"], "mavx512er">, Group<m_x86_Features_Group>;
  4452. def mno_avx512er : Flag<["-"], "mno-avx512er">, Group<m_x86_Features_Group>;
  4453. def mavx512fp16 : Flag<["-"], "mavx512fp16">, Group<m_x86_Features_Group>;
  4454. def mno_avx512fp16 : Flag<["-"], "mno-avx512fp16">, Group<m_x86_Features_Group>;
  4455. def mavx512ifma : Flag<["-"], "mavx512ifma">, Group<m_x86_Features_Group>;
  4456. def mno_avx512ifma : Flag<["-"], "mno-avx512ifma">, Group<m_x86_Features_Group>;
  4457. def mavx512pf : Flag<["-"], "mavx512pf">, Group<m_x86_Features_Group>;
  4458. def mno_avx512pf : Flag<["-"], "mno-avx512pf">, Group<m_x86_Features_Group>;
  4459. def mavx512vbmi : Flag<["-"], "mavx512vbmi">, Group<m_x86_Features_Group>;
  4460. def mno_avx512vbmi : Flag<["-"], "mno-avx512vbmi">, Group<m_x86_Features_Group>;
  4461. def mavx512vbmi2 : Flag<["-"], "mavx512vbmi2">, Group<m_x86_Features_Group>;
  4462. def mno_avx512vbmi2 : Flag<["-"], "mno-avx512vbmi2">, Group<m_x86_Features_Group>;
  4463. def mavx512vl : Flag<["-"], "mavx512vl">, Group<m_x86_Features_Group>;
  4464. def mno_avx512vl : Flag<["-"], "mno-avx512vl">, Group<m_x86_Features_Group>;
  4465. def mavx512vnni : Flag<["-"], "mavx512vnni">, Group<m_x86_Features_Group>;
  4466. def mno_avx512vnni : Flag<["-"], "mno-avx512vnni">, Group<m_x86_Features_Group>;
  4467. def mavx512vpopcntdq : Flag<["-"], "mavx512vpopcntdq">, Group<m_x86_Features_Group>;
  4468. def mno_avx512vpopcntdq : Flag<["-"], "mno-avx512vpopcntdq">, Group<m_x86_Features_Group>;
  4469. def mavx512vp2intersect : Flag<["-"], "mavx512vp2intersect">, Group<m_x86_Features_Group>;
  4470. def mno_avx512vp2intersect : Flag<["-"], "mno-avx512vp2intersect">, Group<m_x86_Features_Group>;
  4471. def mavxifma : Flag<["-"], "mavxifma">, Group<m_x86_Features_Group>;
  4472. def mno_avxifma : Flag<["-"], "mno-avxifma">, Group<m_x86_Features_Group>;
  4473. def mavxneconvert : Flag<["-"], "mavxneconvert">, Group<m_x86_Features_Group>;
  4474. def mno_avxneconvert : Flag<["-"], "mno-avxneconvert">, Group<m_x86_Features_Group>;
  4475. def mavxvnniint8 : Flag<["-"], "mavxvnniint8">, Group<m_x86_Features_Group>;
  4476. def mno_avxvnniint8 : Flag<["-"], "mno-avxvnniint8">, Group<m_x86_Features_Group>;
  4477. def mavxvnni : Flag<["-"], "mavxvnni">, Group<m_x86_Features_Group>;
  4478. def mno_avxvnni : Flag<["-"], "mno-avxvnni">, Group<m_x86_Features_Group>;
  4479. def madx : Flag<["-"], "madx">, Group<m_x86_Features_Group>;
  4480. def mno_adx : Flag<["-"], "mno-adx">, Group<m_x86_Features_Group>;
  4481. def maes : Flag<["-"], "maes">, Group<m_x86_Features_Group>;
  4482. def mno_aes : Flag<["-"], "mno-aes">, Group<m_x86_Features_Group>;
  4483. def mbmi : Flag<["-"], "mbmi">, Group<m_x86_Features_Group>;
  4484. def mno_bmi : Flag<["-"], "mno-bmi">, Group<m_x86_Features_Group>;
  4485. def mbmi2 : Flag<["-"], "mbmi2">, Group<m_x86_Features_Group>;
  4486. def mno_bmi2 : Flag<["-"], "mno-bmi2">, Group<m_x86_Features_Group>;
  4487. def mcldemote : Flag<["-"], "mcldemote">, Group<m_x86_Features_Group>;
  4488. def mno_cldemote : Flag<["-"], "mno-cldemote">, Group<m_x86_Features_Group>;
  4489. def mclflushopt : Flag<["-"], "mclflushopt">, Group<m_x86_Features_Group>;
  4490. def mno_clflushopt : Flag<["-"], "mno-clflushopt">, Group<m_x86_Features_Group>;
  4491. def mclwb : Flag<["-"], "mclwb">, Group<m_x86_Features_Group>;
  4492. def mno_clwb : Flag<["-"], "mno-clwb">, Group<m_x86_Features_Group>;
  4493. def mwbnoinvd : Flag<["-"], "mwbnoinvd">, Group<m_x86_Features_Group>;
  4494. def mno_wbnoinvd : Flag<["-"], "mno-wbnoinvd">, Group<m_x86_Features_Group>;
  4495. def mclzero : Flag<["-"], "mclzero">, Group<m_x86_Features_Group>;
  4496. def mno_clzero : Flag<["-"], "mno-clzero">, Group<m_x86_Features_Group>;
  4497. def mcrc32 : Flag<["-"], "mcrc32">, Group<m_x86_Features_Group>;
  4498. def mno_crc32 : Flag<["-"], "mno-crc32">, Group<m_x86_Features_Group>;
  4499. def mcx16 : Flag<["-"], "mcx16">, Group<m_x86_Features_Group>;
  4500. def mno_cx16 : Flag<["-"], "mno-cx16">, Group<m_x86_Features_Group>;
  4501. def menqcmd : Flag<["-"], "menqcmd">, Group<m_x86_Features_Group>;
  4502. def mno_enqcmd : Flag<["-"], "mno-enqcmd">, Group<m_x86_Features_Group>;
  4503. def mf16c : Flag<["-"], "mf16c">, Group<m_x86_Features_Group>;
  4504. def mno_f16c : Flag<["-"], "mno-f16c">, Group<m_x86_Features_Group>;
  4505. def mfma : Flag<["-"], "mfma">, Group<m_x86_Features_Group>;
  4506. def mno_fma : Flag<["-"], "mno-fma">, Group<m_x86_Features_Group>;
  4507. def mfma4 : Flag<["-"], "mfma4">, Group<m_x86_Features_Group>;
  4508. def mno_fma4 : Flag<["-"], "mno-fma4">, Group<m_x86_Features_Group>;
  4509. def mfsgsbase : Flag<["-"], "mfsgsbase">, Group<m_x86_Features_Group>;
  4510. def mno_fsgsbase : Flag<["-"], "mno-fsgsbase">, Group<m_x86_Features_Group>;
  4511. def mfxsr : Flag<["-"], "mfxsr">, Group<m_x86_Features_Group>;
  4512. def mno_fxsr : Flag<["-"], "mno-fxsr">, Group<m_x86_Features_Group>;
  4513. def minvpcid : Flag<["-"], "minvpcid">, Group<m_x86_Features_Group>;
  4514. def mno_invpcid : Flag<["-"], "mno-invpcid">, Group<m_x86_Features_Group>;
  4515. def mgfni : Flag<["-"], "mgfni">, Group<m_x86_Features_Group>;
  4516. def mno_gfni : Flag<["-"], "mno-gfni">, Group<m_x86_Features_Group>;
  4517. def mhreset : Flag<["-"], "mhreset">, Group<m_x86_Features_Group>;
  4518. def mno_hreset : Flag<["-"], "mno-hreset">, Group<m_x86_Features_Group>;
  4519. def mkl : Flag<["-"], "mkl">, Group<m_x86_Features_Group>;
  4520. def mno_kl : Flag<["-"], "mno-kl">, Group<m_x86_Features_Group>;
  4521. def mwidekl : Flag<["-"], "mwidekl">, Group<m_x86_Features_Group>;
  4522. def mno_widekl : Flag<["-"], "mno-widekl">, Group<m_x86_Features_Group>;
  4523. def mlwp : Flag<["-"], "mlwp">, Group<m_x86_Features_Group>;
  4524. def mno_lwp : Flag<["-"], "mno-lwp">, Group<m_x86_Features_Group>;
  4525. def mlzcnt : Flag<["-"], "mlzcnt">, Group<m_x86_Features_Group>;
  4526. def mno_lzcnt : Flag<["-"], "mno-lzcnt">, Group<m_x86_Features_Group>;
  4527. def mmovbe : Flag<["-"], "mmovbe">, Group<m_x86_Features_Group>;
  4528. def mno_movbe : Flag<["-"], "mno-movbe">, Group<m_x86_Features_Group>;
  4529. def mmovdiri : Flag<["-"], "mmovdiri">, Group<m_x86_Features_Group>;
  4530. def mno_movdiri : Flag<["-"], "mno-movdiri">, Group<m_x86_Features_Group>;
  4531. def mmovdir64b : Flag<["-"], "mmovdir64b">, Group<m_x86_Features_Group>;
  4532. def mno_movdir64b : Flag<["-"], "mno-movdir64b">, Group<m_x86_Features_Group>;
  4533. def mmwaitx : Flag<["-"], "mmwaitx">, Group<m_x86_Features_Group>;
  4534. def mno_mwaitx : Flag<["-"], "mno-mwaitx">, Group<m_x86_Features_Group>;
  4535. def mpku : Flag<["-"], "mpku">, Group<m_x86_Features_Group>;
  4536. def mno_pku : Flag<["-"], "mno-pku">, Group<m_x86_Features_Group>;
  4537. def mpclmul : Flag<["-"], "mpclmul">, Group<m_x86_Features_Group>;
  4538. def mno_pclmul : Flag<["-"], "mno-pclmul">, Group<m_x86_Features_Group>;
  4539. def mpconfig : Flag<["-"], "mpconfig">, Group<m_x86_Features_Group>;
  4540. def mno_pconfig : Flag<["-"], "mno-pconfig">, Group<m_x86_Features_Group>;
  4541. def mpopcnt : Flag<["-"], "mpopcnt">, Group<m_x86_Features_Group>;
  4542. def mno_popcnt : Flag<["-"], "mno-popcnt">, Group<m_x86_Features_Group>;
  4543. def mprefetchi : Flag<["-"], "mprefetchi">, Group<m_x86_Features_Group>;
  4544. def mno_prefetchi : Flag<["-"], "mno-prefetchi">, Group<m_x86_Features_Group>;
  4545. def mprefetchwt1 : Flag<["-"], "mprefetchwt1">, Group<m_x86_Features_Group>;
  4546. def mno_prefetchwt1 : Flag<["-"], "mno-prefetchwt1">, Group<m_x86_Features_Group>;
  4547. def mprfchw : Flag<["-"], "mprfchw">, Group<m_x86_Features_Group>;
  4548. def mno_prfchw : Flag<["-"], "mno-prfchw">, Group<m_x86_Features_Group>;
  4549. def mptwrite : Flag<["-"], "mptwrite">, Group<m_x86_Features_Group>;
  4550. def mno_ptwrite : Flag<["-"], "mno-ptwrite">, Group<m_x86_Features_Group>;
  4551. def mraoint : Flag<["-"], "mraoint">, Group<m_x86_Features_Group>;
  4552. def mno_raoint : Flag<["-"], "mno-raoint">, Group<m_x86_Features_Group>;
  4553. def mrdpid : Flag<["-"], "mrdpid">, Group<m_x86_Features_Group>;
  4554. def mno_rdpid : Flag<["-"], "mno-rdpid">, Group<m_x86_Features_Group>;
  4555. def mrdpru : Flag<["-"], "mrdpru">, Group<m_x86_Features_Group>;
  4556. def mno_rdpru : Flag<["-"], "mno-rdpru">, Group<m_x86_Features_Group>;
  4557. def mrdrnd : Flag<["-"], "mrdrnd">, Group<m_x86_Features_Group>;
  4558. def mno_rdrnd : Flag<["-"], "mno-rdrnd">, Group<m_x86_Features_Group>;
  4559. def mrtm : Flag<["-"], "mrtm">, Group<m_x86_Features_Group>;
  4560. def mno_rtm : Flag<["-"], "mno-rtm">, Group<m_x86_Features_Group>;
  4561. def mrdseed : Flag<["-"], "mrdseed">, Group<m_x86_Features_Group>;
  4562. def mno_rdseed : Flag<["-"], "mno-rdseed">, Group<m_x86_Features_Group>;
  4563. def msahf : Flag<["-"], "msahf">, Group<m_x86_Features_Group>;
  4564. def mno_sahf : Flag<["-"], "mno-sahf">, Group<m_x86_Features_Group>;
  4565. def mserialize : Flag<["-"], "mserialize">, Group<m_x86_Features_Group>;
  4566. def mno_serialize : Flag<["-"], "mno-serialize">, Group<m_x86_Features_Group>;
  4567. def msgx : Flag<["-"], "msgx">, Group<m_x86_Features_Group>;
  4568. def mno_sgx : Flag<["-"], "mno-sgx">, Group<m_x86_Features_Group>;
  4569. def msha : Flag<["-"], "msha">, Group<m_x86_Features_Group>;
  4570. def mno_sha : Flag<["-"], "mno-sha">, Group<m_x86_Features_Group>;
  4571. def mtbm : Flag<["-"], "mtbm">, Group<m_x86_Features_Group>;
  4572. def mno_tbm : Flag<["-"], "mno-tbm">, Group<m_x86_Features_Group>;
  4573. def mtsxldtrk : Flag<["-"], "mtsxldtrk">, Group<m_x86_Features_Group>;
  4574. def mno_tsxldtrk : Flag<["-"], "mno-tsxldtrk">, Group<m_x86_Features_Group>;
  4575. def muintr : Flag<["-"], "muintr">, Group<m_x86_Features_Group>;
  4576. def mno_uintr : Flag<["-"], "mno-uintr">, Group<m_x86_Features_Group>;
  4577. def mvaes : Flag<["-"], "mvaes">, Group<m_x86_Features_Group>;
  4578. def mno_vaes : Flag<["-"], "mno-vaes">, Group<m_x86_Features_Group>;
  4579. def mvpclmulqdq : Flag<["-"], "mvpclmulqdq">, Group<m_x86_Features_Group>;
  4580. def mno_vpclmulqdq : Flag<["-"], "mno-vpclmulqdq">, Group<m_x86_Features_Group>;
  4581. def mwaitpkg : Flag<["-"], "mwaitpkg">, Group<m_x86_Features_Group>;
  4582. def mno_waitpkg : Flag<["-"], "mno-waitpkg">, Group<m_x86_Features_Group>;
  4583. def mxop : Flag<["-"], "mxop">, Group<m_x86_Features_Group>;
  4584. def mno_xop : Flag<["-"], "mno-xop">, Group<m_x86_Features_Group>;
  4585. def mxsave : Flag<["-"], "mxsave">, Group<m_x86_Features_Group>;
  4586. def mno_xsave : Flag<["-"], "mno-xsave">, Group<m_x86_Features_Group>;
  4587. def mxsavec : Flag<["-"], "mxsavec">, Group<m_x86_Features_Group>;
  4588. def mno_xsavec : Flag<["-"], "mno-xsavec">, Group<m_x86_Features_Group>;
  4589. def mxsaveopt : Flag<["-"], "mxsaveopt">, Group<m_x86_Features_Group>;
  4590. def mno_xsaveopt : Flag<["-"], "mno-xsaveopt">, Group<m_x86_Features_Group>;
  4591. def mxsaves : Flag<["-"], "mxsaves">, Group<m_x86_Features_Group>;
  4592. def mno_xsaves : Flag<["-"], "mno-xsaves">, Group<m_x86_Features_Group>;
  4593. def mshstk : Flag<["-"], "mshstk">, Group<m_x86_Features_Group>;
  4594. def mno_shstk : Flag<["-"], "mno-shstk">, Group<m_x86_Features_Group>;
  4595. def mretpoline_external_thunk : Flag<["-"], "mretpoline-external-thunk">, Group<m_x86_Features_Group>;
  4596. def mno_retpoline_external_thunk : Flag<["-"], "mno-retpoline-external-thunk">, Group<m_x86_Features_Group>;
  4597. def mvzeroupper : Flag<["-"], "mvzeroupper">, Group<m_x86_Features_Group>;
  4598. def mno_vzeroupper : Flag<["-"], "mno-vzeroupper">, Group<m_x86_Features_Group>;
  4599. // These are legacy user-facing driver-level option spellings. They are always
  4600. // aliases for options that are spelled using the more common Unix / GNU flag
  4601. // style of double-dash and equals-joined flags.
  4602. def target_legacy_spelling : Separate<["-"], "target">,
  4603. Alias<target>,
  4604. Flags<[CoreOption]>;
  4605. // Special internal option to handle -Xlinker --no-demangle.
  4606. def Z_Xlinker__no_demangle : Flag<["-"], "Z-Xlinker-no-demangle">,
  4607. Flags<[Unsupported, NoArgumentUnused]>;
  4608. // Special internal option to allow forwarding arbitrary arguments to linker.
  4609. def Zlinker_input : Separate<["-"], "Zlinker-input">,
  4610. Flags<[Unsupported, NoArgumentUnused]>;
  4611. // Reserved library options.
  4612. def Z_reserved_lib_stdcxx : Flag<["-"], "Z-reserved-lib-stdc++">,
  4613. Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
  4614. def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">,
  4615. Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, Group<reserved_lib_Group>;
  4616. // Ignored options
  4617. multiclass BooleanFFlag<string name> {
  4618. def f#NAME : Flag<["-"], "f"#name>;
  4619. def fno_#NAME : Flag<["-"], "fno-"#name>;
  4620. }
  4621. defm : BooleanFFlag<"keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>;
  4622. def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<f_Group>;
  4623. // The default value matches BinutilsVersion in MCAsmInfo.h.
  4624. def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">,
  4625. MetaVarName<"<major.minor>">, Group<f_Group>, Flags<[CC1Option]>,
  4626. HelpText<"Produced object files can use all ELF features supported by this "
  4627. "binutils version and newer. If -fno-integrated-as is specified, the "
  4628. "generated assembly will consider GNU as support. 'none' means that all ELF "
  4629. "features can be used, regardless of binutils support. Defaults to 2.26.">;
  4630. def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>, Flags<[CoreOption, LinkOption]>;
  4631. def ld_path_EQ : Joined<["--"], "ld-path=">, Group<Link_Group>;
  4632. defm align_labels : BooleanFFlag<"align-labels">, Group<clang_ignored_gcc_optimization_f_Group>;
  4633. def falign_labels_EQ : Joined<["-"], "falign-labels=">, Group<clang_ignored_gcc_optimization_f_Group>;
  4634. defm align_loops : BooleanFFlag<"align-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
  4635. defm align_jumps : BooleanFFlag<"align-jumps">, Group<clang_ignored_gcc_optimization_f_Group>;
  4636. def falign_jumps_EQ : Joined<["-"], "falign-jumps=">, Group<clang_ignored_gcc_optimization_f_Group>;
  4637. // FIXME: This option should be supported and wired up to our diognostics, but
  4638. // ignore it for now to avoid breaking builds that use it.
  4639. def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>;
  4640. defm fcheck_new : BooleanFFlag<"check-new">, Group<clang_ignored_f_Group>;
  4641. defm caller_saves : BooleanFFlag<"caller-saves">, Group<clang_ignored_gcc_optimization_f_Group>;
  4642. defm reorder_blocks : BooleanFFlag<"reorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>;
  4643. defm branch_count_reg : BooleanFFlag<"branch-count-reg">, Group<clang_ignored_gcc_optimization_f_Group>;
  4644. defm default_inline : BooleanFFlag<"default-inline">, Group<clang_ignored_gcc_optimization_f_Group>;
  4645. defm fat_lto_objects : BooleanFFlag<"fat-lto-objects">, Group<clang_ignored_gcc_optimization_f_Group>;
  4646. defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>;
  4647. defm friend_injection : BooleanFFlag<"friend-injection">, Group<clang_ignored_f_Group>;
  4648. defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>;
  4649. defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>;
  4650. defm gcse_after_reload: BooleanFFlag<"gcse-after-reload">, Group<clang_ignored_gcc_optimization_f_Group>;
  4651. defm gcse_las: BooleanFFlag<"gcse-las">, Group<clang_ignored_gcc_optimization_f_Group>;
  4652. defm gcse_sm: BooleanFFlag<"gcse-sm">, Group<clang_ignored_gcc_optimization_f_Group>;
  4653. defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>;
  4654. defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>;
  4655. defm implement_inlines : BooleanFFlag<"implement-inlines">, Group<clang_ignored_f_Group>;
  4656. defm merge_constants : BooleanFFlag<"merge-constants">, Group<clang_ignored_gcc_optimization_f_Group>;
  4657. defm modulo_sched : BooleanFFlag<"modulo-sched">, Group<clang_ignored_gcc_optimization_f_Group>;
  4658. defm modulo_sched_allow_regmoves : BooleanFFlag<"modulo-sched-allow-regmoves">,
  4659. Group<clang_ignored_gcc_optimization_f_Group>;
  4660. defm inline_functions_called_once : BooleanFFlag<"inline-functions-called-once">,
  4661. Group<clang_ignored_gcc_optimization_f_Group>;
  4662. def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>;
  4663. defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>;
  4664. defm inline_small_functions : BooleanFFlag<"inline-small-functions">,
  4665. Group<clang_ignored_gcc_optimization_f_Group>;
  4666. defm ipa_cp : BooleanFFlag<"ipa-cp">,
  4667. Group<clang_ignored_gcc_optimization_f_Group>;
  4668. defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>;
  4669. defm semantic_interposition : BoolFOption<"semantic-interposition",
  4670. LangOpts<"SemanticInterposition">, DefaultFalse,
  4671. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>>;
  4672. defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
  4673. defm peel_loops : BooleanFFlag<"peel-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
  4674. defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>;
  4675. defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>;
  4676. defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>;
  4677. defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>;
  4678. defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>;
  4679. defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>;
  4680. defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>;
  4681. defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>;
  4682. defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>;
  4683. defm rename_registers : BooleanFFlag<"rename-registers">, Group<clang_ignored_gcc_optimization_f_Group>;
  4684. defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>;
  4685. defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>;
  4686. defm schedule_insns2 : BooleanFFlag<"schedule-insns2">, Group<clang_ignored_gcc_optimization_f_Group>;
  4687. defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>;
  4688. defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>;
  4689. defm single_precision_constant : BooleanFFlag<"single-precision-constant">,
  4690. Group<clang_ignored_gcc_optimization_f_Group>;
  4691. defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>;
  4692. defm stack_check : BooleanFFlag<"stack-check">, Group<clang_ignored_f_Group>;
  4693. defm strength_reduce :
  4694. BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>;
  4695. defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>;
  4696. defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>;
  4697. defm tree_dce : BooleanFFlag<"tree-dce">, Group<clang_ignored_gcc_optimization_f_Group>;
  4698. defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>;
  4699. defm tree_ter : BooleanFFlag<"tree-ter">, Group<clang_ignored_gcc_optimization_f_Group>;
  4700. defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>;
  4701. defm tree_vrp : BooleanFFlag<"tree-vrp">, Group<clang_ignored_gcc_optimization_f_Group>;
  4702. defm : BooleanFFlag<"unit-at-a-time">, Group<clang_ignored_gcc_optimization_f_Group>;
  4703. defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
  4704. defm unsafe_loop_optimizations : BooleanFFlag<"unsafe-loop-optimizations">,
  4705. Group<clang_ignored_gcc_optimization_f_Group>;
  4706. defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>;
  4707. defm use_linker_plugin : BooleanFFlag<"use-linker-plugin">, Group<clang_ignored_gcc_optimization_f_Group>;
  4708. defm vect_cost_model : BooleanFFlag<"vect-cost-model">, Group<clang_ignored_gcc_optimization_f_Group>;
  4709. defm variable_expansion_in_unroller : BooleanFFlag<"variable-expansion-in-unroller">,
  4710. Group<clang_ignored_gcc_optimization_f_Group>;
  4711. defm web : BooleanFFlag<"web">, Group<clang_ignored_gcc_optimization_f_Group>;
  4712. defm whole_program : BooleanFFlag<"whole-program">, Group<clang_ignored_gcc_optimization_f_Group>;
  4713. defm devirtualize : BooleanFFlag<"devirtualize">, Group<clang_ignored_gcc_optimization_f_Group>;
  4714. defm devirtualize_speculatively : BooleanFFlag<"devirtualize-speculatively">,
  4715. Group<clang_ignored_gcc_optimization_f_Group>;
  4716. // Generic gfortran options.
  4717. def A_DASH : Joined<["-"], "A-">, Group<gfortran_Group>;
  4718. def static_libgfortran : Flag<["-"], "static-libgfortran">, Group<gfortran_Group>;
  4719. // "f" options with values for gfortran.
  4720. def fblas_matmul_limit_EQ : Joined<["-"], "fblas-matmul-limit=">, Group<gfortran_Group>;
  4721. def fcheck_EQ : Joined<["-"], "fcheck=">, Group<gfortran_Group>;
  4722. def fcoarray_EQ : Joined<["-"], "fcoarray=">, Group<gfortran_Group>;
  4723. def ffpe_trap_EQ : Joined<["-"], "ffpe-trap=">, Group<gfortran_Group>;
  4724. def ffree_line_length_VALUE : Joined<["-"], "ffree-line-length-">, Group<gfortran_Group>;
  4725. def finit_character_EQ : Joined<["-"], "finit-character=">, Group<gfortran_Group>;
  4726. def finit_integer_EQ : Joined<["-"], "finit-integer=">, Group<gfortran_Group>;
  4727. def finit_logical_EQ : Joined<["-"], "finit-logical=">, Group<gfortran_Group>;
  4728. def finit_real_EQ : Joined<["-"], "finit-real=">, Group<gfortran_Group>;
  4729. def fmax_array_constructor_EQ : Joined<["-"], "fmax-array-constructor=">, Group<gfortran_Group>;
  4730. def fmax_errors_EQ : Joined<["-"], "fmax-errors=">, Group<gfortran_Group>;
  4731. def fmax_stack_var_size_EQ : Joined<["-"], "fmax-stack-var-size=">, Group<gfortran_Group>;
  4732. def fmax_subrecord_length_EQ : Joined<["-"], "fmax-subrecord-length=">, Group<gfortran_Group>;
  4733. def frecord_marker_EQ : Joined<["-"], "frecord-marker=">, Group<gfortran_Group>;
  4734. // "f" flags for gfortran.
  4735. defm aggressive_function_elimination : BooleanFFlag<"aggressive-function-elimination">, Group<gfortran_Group>;
  4736. defm align_commons : BooleanFFlag<"align-commons">, Group<gfortran_Group>;
  4737. defm all_intrinsics : BooleanFFlag<"all-intrinsics">, Group<gfortran_Group>;
  4738. def fautomatic : Flag<["-"], "fautomatic">; // -fno-automatic is significant
  4739. defm backtrace : BooleanFFlag<"backtrace">, Group<gfortran_Group>;
  4740. defm bounds_check : BooleanFFlag<"bounds-check">, Group<gfortran_Group>;
  4741. defm check_array_temporaries : BooleanFFlag<"check-array-temporaries">, Group<gfortran_Group>;
  4742. defm cray_pointer : BooleanFFlag<"cray-pointer">, Group<gfortran_Group>;
  4743. defm d_lines_as_code : BooleanFFlag<"d-lines-as-code">, Group<gfortran_Group>;
  4744. defm d_lines_as_comments : BooleanFFlag<"d-lines-as-comments">, Group<gfortran_Group>;
  4745. defm dollar_ok : BooleanFFlag<"dollar-ok">, Group<gfortran_Group>;
  4746. defm dump_fortran_optimized : BooleanFFlag<"dump-fortran-optimized">, Group<gfortran_Group>;
  4747. defm dump_fortran_original : BooleanFFlag<"dump-fortran-original">, Group<gfortran_Group>;
  4748. defm dump_parse_tree : BooleanFFlag<"dump-parse-tree">, Group<gfortran_Group>;
  4749. defm external_blas : BooleanFFlag<"external-blas">, Group<gfortran_Group>;
  4750. defm f2c : BooleanFFlag<"f2c">, Group<gfortran_Group>;
  4751. defm frontend_optimize : BooleanFFlag<"frontend-optimize">, Group<gfortran_Group>;
  4752. defm init_local_zero : BooleanFFlag<"init-local-zero">, Group<gfortran_Group>;
  4753. defm integer_4_integer_8 : BooleanFFlag<"integer-4-integer-8">, Group<gfortran_Group>;
  4754. defm max_identifier_length : BooleanFFlag<"max-identifier-length">, Group<gfortran_Group>;
  4755. defm module_private : BooleanFFlag<"module-private">, Group<gfortran_Group>;
  4756. defm pack_derived : BooleanFFlag<"pack-derived">, Group<gfortran_Group>;
  4757. //defm protect_parens : BooleanFFlag<"protect-parens">, Group<gfortran_Group>;
  4758. defm range_check : BooleanFFlag<"range-check">, Group<gfortran_Group>;
  4759. defm real_4_real_10 : BooleanFFlag<"real-4-real-10">, Group<gfortran_Group>;
  4760. defm real_4_real_16 : BooleanFFlag<"real-4-real-16">, Group<gfortran_Group>;
  4761. defm real_4_real_8 : BooleanFFlag<"real-4-real-8">, Group<gfortran_Group>;
  4762. defm real_8_real_10 : BooleanFFlag<"real-8-real-10">, Group<gfortran_Group>;
  4763. defm real_8_real_16 : BooleanFFlag<"real-8-real-16">, Group<gfortran_Group>;
  4764. defm real_8_real_4 : BooleanFFlag<"real-8-real-4">, Group<gfortran_Group>;
  4765. defm realloc_lhs : BooleanFFlag<"realloc-lhs">, Group<gfortran_Group>;
  4766. defm recursive : BooleanFFlag<"recursive">, Group<gfortran_Group>;
  4767. defm repack_arrays : BooleanFFlag<"repack-arrays">, Group<gfortran_Group>;
  4768. defm second_underscore : BooleanFFlag<"second-underscore">, Group<gfortran_Group>;
  4769. defm sign_zero : BooleanFFlag<"sign-zero">, Group<gfortran_Group>;
  4770. defm stack_arrays : BooleanFFlag<"stack-arrays">, Group<gfortran_Group>;
  4771. defm underscoring : BooleanFFlag<"underscoring">, Group<gfortran_Group>;
  4772. defm whole_file : BooleanFFlag<"whole-file">, Group<gfortran_Group>;
  4773. // C++ SYCL options
  4774. def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>,
  4775. Group<sycl_Group>, HelpText<"Enables SYCL kernels compilation for device">;
  4776. def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>,
  4777. Group<sycl_Group>, HelpText<"Disables SYCL kernels compilation for device">;
  4778. //===----------------------------------------------------------------------===//
  4779. // FLangOption + NoXarchOption
  4780. //===----------------------------------------------------------------------===//
  4781. def flang_experimental_exec : Flag<["-"], "flang-experimental-exec">,
  4782. Flags<[FlangOption, FlangOnlyOption, NoXarchOption, HelpHidden]>,
  4783. HelpText<"Enable support for generating executables (experimental)">;
  4784. //===----------------------------------------------------------------------===//
  4785. // FLangOption + CoreOption + NoXarchOption
  4786. //===----------------------------------------------------------------------===//
  4787. def Xflang : Separate<["-"], "Xflang">,
  4788. HelpText<"Pass <arg> to the flang compiler">, MetaVarName<"<arg>">,
  4789. Flags<[FlangOption, FlangOnlyOption, NoXarchOption, CoreOption]>,
  4790. Group<CompileOnly_Group>;
  4791. //===----------------------------------------------------------------------===//
  4792. // FlangOption and FC1 Options
  4793. //===----------------------------------------------------------------------===//
  4794. let Flags = [FC1Option, FlangOption, FlangOnlyOption] in {
  4795. def cpp : Flag<["-"], "cpp">, Group<f_Group>,
  4796. HelpText<"Enable predefined and command line preprocessor macros">;
  4797. def nocpp : Flag<["-"], "nocpp">, Group<f_Group>,
  4798. HelpText<"Disable predefined and command line preprocessor macros">;
  4799. def module_dir : JoinedOrSeparate<["-"], "module-dir">, MetaVarName<"<dir>">,
  4800. HelpText<"Put MODULE files in <dir>">,
  4801. DocBrief<[{This option specifies where to put .mod files for compiled modules.
  4802. It is also added to the list of directories to be searched by an USE statement.
  4803. The default is the current directory.}]>;
  4804. def ffixed_form : Flag<["-"], "ffixed-form">, Group<f_Group>,
  4805. HelpText<"Process source files in fixed form">;
  4806. def ffree_form : Flag<["-"], "ffree-form">, Group<f_Group>,
  4807. HelpText<"Process source files in free form">;
  4808. def ffixed_line_length_EQ : Joined<["-"], "ffixed-line-length=">, Group<f_Group>,
  4809. HelpText<"Use <value> as character line width in fixed mode">,
  4810. DocBrief<[{Set column after which characters are ignored in typical fixed-form lines in the source
  4811. file}]>;
  4812. def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group<f_Group>, Alias<ffixed_line_length_EQ>;
  4813. def fconvert_EQ : Joined<["-"], "fconvert=">, Group<f_Group>,
  4814. HelpText<"Set endian conversion of data for unformatted files">;
  4815. def fopenacc : Flag<["-"], "fopenacc">, Group<f_Group>,
  4816. HelpText<"Enable OpenACC">;
  4817. def fdefault_double_8 : Flag<["-"],"fdefault-double-8">, Group<f_Group>,
  4818. HelpText<"Set the default double precision kind to an 8 byte wide type">;
  4819. def fdefault_integer_8 : Flag<["-"],"fdefault-integer-8">, Group<f_Group>,
  4820. HelpText<"Set the default integer kind to an 8 byte wide type">;
  4821. def fdefault_real_8 : Flag<["-"],"fdefault-real-8">, Group<f_Group>,
  4822. HelpText<"Set the default real kind to an 8 byte wide type">;
  4823. def flarge_sizes : Flag<["-"],"flarge-sizes">, Group<f_Group>,
  4824. HelpText<"Use INTEGER(KIND=8) for the result type in size-related intrinsics">;
  4825. def falternative_parameter_statement : Flag<["-"], "falternative-parameter-statement">, Group<f_Group>,
  4826. HelpText<"Enable the old style PARAMETER statement">;
  4827. def fintrinsic_modules_path : Separate<["-"], "fintrinsic-modules-path">, Group<f_Group>, MetaVarName<"<dir>">,
  4828. HelpText<"Specify where to find the compiled intrinsic modules">,
  4829. DocBrief<[{This option specifies the location of pre-compiled intrinsic modules,
  4830. if they are not in the default location expected by the compiler.}]>;
  4831. defm backslash : OptInFC1FFlag<"backslash", "Specify that backslash in string introduces an escape character">;
  4832. defm xor_operator : OptInFC1FFlag<"xor-operator", "Enable .XOR. as a synonym of .NEQV.">;
  4833. defm logical_abbreviations : OptInFC1FFlag<"logical-abbreviations", "Enable logical abbreviations">;
  4834. defm implicit_none : OptInFC1FFlag<"implicit-none", "No implicit typing allowed unless overridden by IMPLICIT statements">;
  4835. def fno_automatic : Flag<["-"], "fno-automatic">, Group<f_Group>,
  4836. HelpText<"Implies the SAVE attribute for non-automatic local objects in subprograms unless RECURSIVE">;
  4837. } // let Flags = [FC1Option, FlangOption, FlangOnlyOption]
  4838. def J : JoinedOrSeparate<["-"], "J">,
  4839. Flags<[RenderJoined, FlangOption, FC1Option, FlangOnlyOption]>,
  4840. Group<gfortran_Group>,
  4841. Alias<module_dir>;
  4842. //===----------------------------------------------------------------------===//
  4843. // FC1 Options
  4844. //===----------------------------------------------------------------------===//
  4845. let Flags = [FC1Option, FlangOnlyOption] in {
  4846. def fget_definition : MultiArg<["-"], "fget-definition", 3>,
  4847. HelpText<"Get the symbol definition from <line> <start-column> <end-column>">,
  4848. Group<Action_Group>;
  4849. def test_io : Flag<["-"], "test-io">, Group<Action_Group>,
  4850. HelpText<"Run the InputOuputTest action. Use for development and testing only.">;
  4851. def fdebug_unparse_no_sema : Flag<["-"], "fdebug-unparse-no-sema">, Group<Action_Group>,
  4852. HelpText<"Unparse and stop (skips the semantic checks)">,
  4853. DocBrief<[{Only run the parser, then unparse the parse-tree and output the
  4854. generated Fortran source file. Semantic checks are disabled.}]>;
  4855. def fdebug_unparse : Flag<["-"], "fdebug-unparse">, Group<Action_Group>,
  4856. HelpText<"Unparse and stop.">,
  4857. DocBrief<[{Run the parser and the semantic checks. Then unparse the
  4858. parse-tree and output the generated Fortran source file.}]>;
  4859. def fdebug_unparse_with_symbols : Flag<["-"], "fdebug-unparse-with-symbols">, Group<Action_Group>,
  4860. HelpText<"Unparse and stop.">;
  4861. def fdebug_dump_symbols : Flag<["-"], "fdebug-dump-symbols">, Group<Action_Group>,
  4862. HelpText<"Dump symbols after the semantic analysis">;
  4863. def fdebug_dump_parse_tree : Flag<["-"], "fdebug-dump-parse-tree">, Group<Action_Group>,
  4864. HelpText<"Dump the parse tree">,
  4865. DocBrief<[{Run the Parser and the semantic checks, and then output the
  4866. parse tree.}]>;
  4867. def fdebug_dump_pft : Flag<["-"], "fdebug-dump-pft">, Group<Action_Group>,
  4868. HelpText<"Dump the pre-fir parse tree">;
  4869. def fdebug_dump_parse_tree_no_sema : Flag<["-"], "fdebug-dump-parse-tree-no-sema">, Group<Action_Group>,
  4870. HelpText<"Dump the parse tree (skips the semantic checks)">,
  4871. DocBrief<[{Run the Parser and then output the parse tree. Semantic
  4872. checks are disabled.}]>;
  4873. def fdebug_dump_all : Flag<["-"], "fdebug-dump-all">, Group<Action_Group>,
  4874. HelpText<"Dump symbols and the parse tree after the semantic checks">;
  4875. def fdebug_dump_provenance : Flag<["-"], "fdebug-dump-provenance">, Group<Action_Group>,
  4876. HelpText<"Dump provenance">;
  4877. def fdebug_dump_parsing_log : Flag<["-"], "fdebug-dump-parsing-log">, Group<Action_Group>,
  4878. HelpText<"Run instrumented parse and dump the parsing log">;
  4879. def fdebug_measure_parse_tree : Flag<["-"], "fdebug-measure-parse-tree">, Group<Action_Group>,
  4880. HelpText<"Measure the parse tree">;
  4881. def fdebug_pre_fir_tree : Flag<["-"], "fdebug-pre-fir-tree">, Group<Action_Group>,
  4882. HelpText<"Dump the pre-FIR tree">;
  4883. def fdebug_module_writer : Flag<["-"],"fdebug-module-writer">,
  4884. HelpText<"Enable debug messages while writing module files">;
  4885. def fget_symbols_sources : Flag<["-"], "fget-symbols-sources">, Group<Action_Group>,
  4886. HelpText<"Dump symbols and their source code locations">;
  4887. def module_suffix : Separate<["-"], "module-suffix">, Group<f_Group>, MetaVarName<"<suffix>">,
  4888. HelpText<"Use <suffix> as the suffix for module files (the default value is `.mod`)">;
  4889. def fno_reformat : Flag<["-"], "fno-reformat">, Group<Preprocessor_Group>,
  4890. HelpText<"Dump the cooked character stream in -E mode">;
  4891. defm analyzed_objects_for_unparse : OptOutFC1FFlag<"analyzed-objects-for-unparse", "", "Do not use the analyzed objects when unparsing">;
  4892. def emit_mlir : Flag<["-"], "emit-mlir">, Group<Action_Group>,
  4893. HelpText<"Build the parse tree, then lower it to MLIR">;
  4894. def emit_fir : Flag<["-"], "emit-fir">, Alias<emit_mlir>;
  4895. } // let Flags = [FC1Option, FlangOnlyOption]
  4896. //===----------------------------------------------------------------------===//
  4897. // Target Options (cc1 + cc1as)
  4898. //===----------------------------------------------------------------------===//
  4899. let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
  4900. def tune_cpu : Separate<["-"], "tune-cpu">,
  4901. HelpText<"Tune for a specific cpu type">,
  4902. MarshallingInfoString<TargetOpts<"TuneCPU">>;
  4903. def target_abi : Separate<["-"], "target-abi">,
  4904. HelpText<"Target a particular ABI type">,
  4905. MarshallingInfoString<TargetOpts<"ABI">>;
  4906. def target_sdk_version_EQ : Joined<["-"], "target-sdk-version=">,
  4907. HelpText<"The version of target SDK used for compilation">;
  4908. def darwin_target_variant_sdk_version_EQ : Joined<["-"],
  4909. "darwin-target-variant-sdk-version=">,
  4910. HelpText<"The version of darwin target variant SDK used for compilation">;
  4911. } // let Flags = [CC1Option, CC1AsOption, NoDriverOption]
  4912. let Flags = [CC1Option, CC1AsOption] in {
  4913. def darwin_target_variant_triple : Separate<["-"], "darwin-target-variant-triple">,
  4914. HelpText<"Specify the darwin target variant triple">,
  4915. MarshallingInfoString<TargetOpts<"DarwinTargetVariantTriple">>,
  4916. Normalizer<"normalizeTriple">;
  4917. } // let Flags = [CC1Option, CC1AsOption]
  4918. //===----------------------------------------------------------------------===//
  4919. // Target Options (cc1 + cc1as + fc1)
  4920. //===----------------------------------------------------------------------===//
  4921. let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] in {
  4922. def target_cpu : Separate<["-"], "target-cpu">,
  4923. HelpText<"Target a specific cpu type">,
  4924. MarshallingInfoString<TargetOpts<"CPU">>;
  4925. def target_feature : Separate<["-"], "target-feature">,
  4926. HelpText<"Target specific attributes">,
  4927. MarshallingInfoStringVector<TargetOpts<"FeaturesAsWritten">>;
  4928. def triple : Separate<["-"], "triple">,
  4929. HelpText<"Specify target triple (e.g. i686-apple-darwin9)">,
  4930. MarshallingInfoString<TargetOpts<"Triple">, "llvm::Triple::normalize(llvm::sys::getDefaultTargetTriple())">,
  4931. AlwaysEmit, Normalizer<"normalizeTriple">;
  4932. } // let Flags = [CC1Option, CC1ASOption, FC1Option, NoDriverOption]
  4933. //===----------------------------------------------------------------------===//
  4934. // Target Options (other)
  4935. //===----------------------------------------------------------------------===//
  4936. let Flags = [CC1Option, NoDriverOption] in {
  4937. def target_linker_version : Separate<["-"], "target-linker-version">,
  4938. HelpText<"Target linker version">,
  4939. MarshallingInfoString<TargetOpts<"LinkerVersion">>;
  4940. def triple_EQ : Joined<["-"], "triple=">, Alias<triple>;
  4941. def mfpmath : Separate<["-"], "mfpmath">,
  4942. HelpText<"Which unit to use for fp math">,
  4943. MarshallingInfoString<TargetOpts<"FPMath">>;
  4944. defm padding_on_unsigned_fixed_point : BoolOption<"f", "padding-on-unsigned-fixed-point",
  4945. LangOpts<"PaddingOnUnsignedFixedPoint">, DefaultFalse,
  4946. PosFlag<SetTrue, [], "Force each unsigned fixed point type to have an extra bit of padding to align their scales with those of signed fixed point types">,
  4947. NegFlag<SetFalse>>,
  4948. ShouldParseIf<ffixed_point.KeyPath>;
  4949. } // let Flags = [CC1Option, NoDriverOption]
  4950. //===----------------------------------------------------------------------===//
  4951. // Analyzer Options
  4952. //===----------------------------------------------------------------------===//
  4953. let Flags = [CC1Option, NoDriverOption] in {
  4954. def analysis_UnoptimizedCFG : Flag<["-"], "unoptimized-cfg">,
  4955. HelpText<"Generate unoptimized CFGs for all analyses">,
  4956. MarshallingInfoFlag<AnalyzerOpts<"UnoptimizedCFG">>;
  4957. def analysis_CFGAddImplicitDtors : Flag<["-"], "cfg-add-implicit-dtors">,
  4958. HelpText<"Add C++ implicit destructors to CFGs for all analyses">;
  4959. def analyzer_constraints : Separate<["-"], "analyzer-constraints">,
  4960. HelpText<"Source Code Analysis - Symbolic Constraint Engines">;
  4961. def analyzer_constraints_EQ : Joined<["-"], "analyzer-constraints=">,
  4962. Alias<analyzer_constraints>;
  4963. def analyzer_output : Separate<["-"], "analyzer-output">,
  4964. HelpText<"Source Code Analysis - Output Options">;
  4965. def analyzer_output_EQ : Joined<["-"], "analyzer-output=">,
  4966. Alias<analyzer_output>;
  4967. def analyzer_purge : Separate<["-"], "analyzer-purge">,
  4968. HelpText<"Source Code Analysis - Dead Symbol Removal Frequency">;
  4969. def analyzer_purge_EQ : Joined<["-"], "analyzer-purge=">, Alias<analyzer_purge>;
  4970. def analyzer_opt_analyze_headers : Flag<["-"], "analyzer-opt-analyze-headers">,
  4971. HelpText<"Force the static analyzer to analyze functions defined in header files">,
  4972. MarshallingInfoFlag<AnalyzerOpts<"AnalyzeAll">>;
  4973. def analyzer_display_progress : Flag<["-"], "analyzer-display-progress">,
  4974. HelpText<"Emit verbose output about the analyzer's progress">,
  4975. MarshallingInfoFlag<AnalyzerOpts<"AnalyzerDisplayProgress">>;
  4976. def analyze_function : Separate<["-"], "analyze-function">,
  4977. HelpText<"Run analysis on specific function (for C++ include parameters in name)">,
  4978. MarshallingInfoString<AnalyzerOpts<"AnalyzeSpecificFunction">>;
  4979. def analyze_function_EQ : Joined<["-"], "analyze-function=">, Alias<analyze_function>;
  4980. def trim_egraph : Flag<["-"], "trim-egraph">,
  4981. HelpText<"Only show error-related paths in the analysis graph">,
  4982. MarshallingInfoFlag<AnalyzerOpts<"TrimGraph">>;
  4983. def analyzer_viz_egraph_graphviz : Flag<["-"], "analyzer-viz-egraph-graphviz">,
  4984. HelpText<"Display exploded graph using GraphViz">,
  4985. MarshallingInfoFlag<AnalyzerOpts<"visualizeExplodedGraphWithGraphViz">>;
  4986. def analyzer_dump_egraph : Separate<["-"], "analyzer-dump-egraph">,
  4987. HelpText<"Dump exploded graph to the specified file">,
  4988. MarshallingInfoString<AnalyzerOpts<"DumpExplodedGraphTo">>;
  4989. def analyzer_dump_egraph_EQ : Joined<["-"], "analyzer-dump-egraph=">, Alias<analyzer_dump_egraph>;
  4990. def analyzer_inline_max_stack_depth : Separate<["-"], "analyzer-inline-max-stack-depth">,
  4991. HelpText<"Bound on stack depth while inlining (4 by default)">,
  4992. // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls).
  4993. MarshallingInfoInt<AnalyzerOpts<"InlineMaxStackDepth">, "5">;
  4994. def analyzer_inline_max_stack_depth_EQ : Joined<["-"], "analyzer-inline-max-stack-depth=">,
  4995. Alias<analyzer_inline_max_stack_depth>;
  4996. def analyzer_inlining_mode : Separate<["-"], "analyzer-inlining-mode">,
  4997. HelpText<"Specify the function selection heuristic used during inlining">;
  4998. def analyzer_inlining_mode_EQ : Joined<["-"], "analyzer-inlining-mode=">, Alias<analyzer_inlining_mode>;
  4999. def analyzer_disable_retry_exhausted : Flag<["-"], "analyzer-disable-retry-exhausted">,
  5000. HelpText<"Do not re-analyze paths leading to exhausted nodes with a different strategy (may decrease code coverage)">,
  5001. MarshallingInfoFlag<AnalyzerOpts<"NoRetryExhausted">>;
  5002. def analyzer_max_loop : Separate<["-"], "analyzer-max-loop">,
  5003. HelpText<"The maximum number of times the analyzer will go through a loop">,
  5004. MarshallingInfoInt<AnalyzerOpts<"maxBlockVisitOnPath">, "4">;
  5005. def analyzer_stats : Flag<["-"], "analyzer-stats">,
  5006. HelpText<"Print internal analyzer statistics.">,
  5007. MarshallingInfoFlag<AnalyzerOpts<"PrintStats">>;
  5008. def analyzer_checker : Separate<["-"], "analyzer-checker">,
  5009. HelpText<"Choose analyzer checkers to enable">,
  5010. ValuesCode<[{
  5011. static constexpr const char VALUES_CODE [] =
  5012. #define GET_CHECKERS
  5013. #define CHECKER(FULLNAME, CLASS, HT, DOC_URI, IS_HIDDEN) FULLNAME ","
  5014. #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
  5015. #undef GET_CHECKERS
  5016. #define GET_PACKAGES
  5017. #define PACKAGE(FULLNAME) FULLNAME ","
  5018. #include "clang/StaticAnalyzer/Checkers/Checkers.inc"
  5019. #undef GET_PACKAGES
  5020. ;
  5021. }]>;
  5022. def analyzer_checker_EQ : Joined<["-"], "analyzer-checker=">,
  5023. Alias<analyzer_checker>;
  5024. def analyzer_disable_checker : Separate<["-"], "analyzer-disable-checker">,
  5025. HelpText<"Choose analyzer checkers to disable">;
  5026. def analyzer_disable_checker_EQ : Joined<["-"], "analyzer-disable-checker=">,
  5027. Alias<analyzer_disable_checker>;
  5028. def analyzer_disable_all_checks : Flag<["-"], "analyzer-disable-all-checks">,
  5029. HelpText<"Disable all static analyzer checks">,
  5030. MarshallingInfoFlag<AnalyzerOpts<"DisableAllCheckers">>;
  5031. def analyzer_checker_help : Flag<["-"], "analyzer-checker-help">,
  5032. HelpText<"Display the list of analyzer checkers that are available">,
  5033. MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelp">>;
  5034. def analyzer_checker_help_alpha : Flag<["-"], "analyzer-checker-help-alpha">,
  5035. HelpText<"Display the list of in development analyzer checkers. These "
  5036. "are NOT considered safe, they are unstable and will emit incorrect "
  5037. "reports. Enable ONLY FOR DEVELOPMENT purposes">,
  5038. MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpAlpha">>;
  5039. def analyzer_checker_help_developer : Flag<["-"], "analyzer-checker-help-developer">,
  5040. HelpText<"Display the list of developer-only checkers such as modeling "
  5041. "and debug checkers">,
  5042. MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerHelpDeveloper">>;
  5043. def analyzer_config_help : Flag<["-"], "analyzer-config-help">,
  5044. HelpText<"Display the list of -analyzer-config options. These are meant for "
  5045. "development purposes only!">,
  5046. MarshallingInfoFlag<AnalyzerOpts<"ShowConfigOptionsList">>;
  5047. def analyzer_list_enabled_checkers : Flag<["-"], "analyzer-list-enabled-checkers">,
  5048. HelpText<"Display the list of enabled analyzer checkers">,
  5049. MarshallingInfoFlag<AnalyzerOpts<"ShowEnabledCheckerList">>;
  5050. def analyzer_config : Separate<["-"], "analyzer-config">,
  5051. HelpText<"Choose analyzer options to enable">;
  5052. def analyzer_checker_option_help : Flag<["-"], "analyzer-checker-option-help">,
  5053. HelpText<"Display the list of checker and package options">,
  5054. MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionList">>;
  5055. def analyzer_checker_option_help_alpha : Flag<["-"], "analyzer-checker-option-help-alpha">,
  5056. HelpText<"Display the list of in development checker and package options. "
  5057. "These are NOT considered safe, they are unstable and will emit "
  5058. "incorrect reports. Enable ONLY FOR DEVELOPMENT purposes">,
  5059. MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionAlphaList">>;
  5060. def analyzer_checker_option_help_developer : Flag<["-"], "analyzer-checker-option-help-developer">,
  5061. HelpText<"Display the list of checker and package options meant for "
  5062. "development purposes only">,
  5063. MarshallingInfoFlag<AnalyzerOpts<"ShowCheckerOptionDeveloperList">>;
  5064. def analyzer_config_compatibility_mode : Separate<["-"], "analyzer-config-compatibility-mode">,
  5065. HelpText<"Don't emit errors on invalid analyzer-config inputs">,
  5066. Values<"true,false">, NormalizedValues<[[{false}], [{true}]]>,
  5067. MarshallingInfoEnum<AnalyzerOpts<"ShouldEmitErrorsOnInvalidConfigValue">, [{true}]>;
  5068. def analyzer_config_compatibility_mode_EQ : Joined<["-"], "analyzer-config-compatibility-mode=">,
  5069. Alias<analyzer_config_compatibility_mode>;
  5070. def analyzer_werror : Flag<["-"], "analyzer-werror">,
  5071. HelpText<"Emit analyzer results as errors rather than warnings">,
  5072. MarshallingInfoFlag<AnalyzerOpts<"AnalyzerWerror">>;
  5073. } // let Flags = [CC1Option, NoDriverOption]
  5074. //===----------------------------------------------------------------------===//
  5075. // Migrator Options
  5076. //===----------------------------------------------------------------------===//
  5077. def migrator_no_nsalloc_error : Flag<["-"], "no-ns-alloc-error">,
  5078. HelpText<"Do not error on use of NSAllocateCollectable/NSReallocateCollectable">,
  5079. Flags<[CC1Option, NoDriverOption]>,
  5080. MarshallingInfoFlag<MigratorOpts<"NoNSAllocReallocError">>;
  5081. def migrator_no_finalize_removal : Flag<["-"], "no-finalize-removal">,
  5082. HelpText<"Do not remove finalize method in gc mode">,
  5083. Flags<[CC1Option, NoDriverOption]>,
  5084. MarshallingInfoFlag<MigratorOpts<"NoFinalizeRemoval">>;
  5085. //===----------------------------------------------------------------------===//
  5086. // CodeGen Options
  5087. //===----------------------------------------------------------------------===//
  5088. let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption] in {
  5089. def mrelocation_model : Separate<["-"], "mrelocation-model">,
  5090. HelpText<"The relocation model to use">, Values<"static,pic,ropi,rwpi,ropi-rwpi,dynamic-no-pic">,
  5091. NormalizedValuesScope<"llvm::Reloc">,
  5092. NormalizedValues<["Static", "PIC_", "ROPI", "RWPI", "ROPI_RWPI", "DynamicNoPIC"]>,
  5093. MarshallingInfoEnum<CodeGenOpts<"RelocationModel">, "PIC_">;
  5094. } // let Flags = [CC1Option, CC1AsOption, FC1Option, NoDriverOption]
  5095. let Flags = [CC1Option, CC1AsOption, NoDriverOption] in {
  5096. def debug_info_kind_EQ : Joined<["-"], "debug-info-kind=">;
  5097. def debug_info_macro : Flag<["-"], "debug-info-macro">,
  5098. HelpText<"Emit macro debug information">,
  5099. MarshallingInfoFlag<CodeGenOpts<"MacroDebugInfo">>;
  5100. def default_function_attr : Separate<["-"], "default-function-attr">,
  5101. HelpText<"Apply given attribute to all functions">,
  5102. MarshallingInfoStringVector<CodeGenOpts<"DefaultFunctionAttrs">>;
  5103. def dwarf_version_EQ : Joined<["-"], "dwarf-version=">,
  5104. MarshallingInfoInt<CodeGenOpts<"DwarfVersion">>;
  5105. def debugger_tuning_EQ : Joined<["-"], "debugger-tuning=">,
  5106. Values<"gdb,lldb,sce,dbx">,
  5107. NormalizedValuesScope<"llvm::DebuggerKind">, NormalizedValues<["GDB", "LLDB", "SCE", "DBX"]>,
  5108. MarshallingInfoEnum<CodeGenOpts<"DebuggerTuning">, "Default">;
  5109. def dwarf_debug_flags : Separate<["-"], "dwarf-debug-flags">,
  5110. HelpText<"The string to embed in the Dwarf debug flags record.">,
  5111. MarshallingInfoString<CodeGenOpts<"DwarfDebugFlags">>;
  5112. def record_command_line : Separate<["-"], "record-command-line">,
  5113. HelpText<"The string to embed in the .LLVM.command.line section.">,
  5114. MarshallingInfoString<CodeGenOpts<"RecordCommandLine">>;
  5115. def compress_debug_sections_EQ : Joined<["-", "--"], "compress-debug-sections=">,
  5116. HelpText<"DWARF debug sections compression type">, Values<"none,zlib,zstd">,
  5117. NormalizedValuesScope<"llvm::DebugCompressionType">, NormalizedValues<["None", "Zlib", "Zstd"]>,
  5118. MarshallingInfoEnum<CodeGenOpts<"CompressDebugSections">, "None">;
  5119. def compress_debug_sections : Flag<["-", "--"], "compress-debug-sections">,
  5120. Alias<compress_debug_sections_EQ>, AliasArgs<["zlib"]>;
  5121. def mno_exec_stack : Flag<["-"], "mnoexecstack">,
  5122. HelpText<"Mark the file as not needing an executable stack">,
  5123. MarshallingInfoFlag<CodeGenOpts<"NoExecStack">>;
  5124. def massembler_no_warn : Flag<["-"], "massembler-no-warn">,
  5125. HelpText<"Make assembler not emit warnings">,
  5126. MarshallingInfoFlag<CodeGenOpts<"NoWarn">>;
  5127. def massembler_fatal_warnings : Flag<["-"], "massembler-fatal-warnings">,
  5128. HelpText<"Make assembler warnings fatal">,
  5129. MarshallingInfoFlag<CodeGenOpts<"FatalWarnings">>;
  5130. def mrelax_relocations_no : Flag<["-"], "mrelax-relocations=no">,
  5131. HelpText<"Disable x86 relax relocations">,
  5132. MarshallingInfoNegativeFlag<CodeGenOpts<"RelaxELFRelocations">>;
  5133. def msave_temp_labels : Flag<["-"], "msave-temp-labels">,
  5134. HelpText<"Save temporary labels in the symbol table. "
  5135. "Note this may change .s semantics and shouldn't generally be used "
  5136. "on compiler-generated code.">,
  5137. MarshallingInfoFlag<CodeGenOpts<"SaveTempLabels">>;
  5138. def mno_type_check : Flag<["-"], "mno-type-check">,
  5139. HelpText<"Don't perform type checking of the assembly code (wasm only)">,
  5140. MarshallingInfoFlag<CodeGenOpts<"NoTypeCheck">>;
  5141. def fno_math_builtin : Flag<["-"], "fno-math-builtin">,
  5142. HelpText<"Disable implicit builtin knowledge of math functions">,
  5143. MarshallingInfoFlag<LangOpts<"NoMathBuiltin">>;
  5144. def fno_use_ctor_homing: Flag<["-"], "fno-use-ctor-homing">,
  5145. HelpText<"Don't use constructor homing for debug info">;
  5146. def fuse_ctor_homing: Flag<["-"], "fuse-ctor-homing">,
  5147. HelpText<"Use constructor homing if we are using limited debug info already">;
  5148. def as_secure_log_file : Separate<["-"], "as-secure-log-file">,
  5149. HelpText<"Emit .secure_log_unique directives to this filename.">,
  5150. MarshallingInfoString<CodeGenOpts<"AsSecureLogFile">>;
  5151. } // let Flags = [CC1Option, CC1AsOption, NoDriverOption]
  5152. let Flags = [CC1Option, NoDriverOption] in {
  5153. def disable_llvm_verifier : Flag<["-"], "disable-llvm-verifier">,
  5154. HelpText<"Don't run the LLVM IR verifier pass">,
  5155. MarshallingInfoNegativeFlag<CodeGenOpts<"VerifyModule">>;
  5156. def disable_llvm_passes : Flag<["-"], "disable-llvm-passes">,
  5157. HelpText<"Use together with -emit-llvm to get pristine LLVM IR from the "
  5158. "frontend by not running any LLVM passes at all">,
  5159. MarshallingInfoFlag<CodeGenOpts<"DisableLLVMPasses">>;
  5160. def disable_llvm_optzns : Flag<["-"], "disable-llvm-optzns">,
  5161. Alias<disable_llvm_passes>;
  5162. def disable_lifetimemarkers : Flag<["-"], "disable-lifetime-markers">,
  5163. HelpText<"Disable lifetime-markers emission even when optimizations are "
  5164. "enabled">,
  5165. MarshallingInfoFlag<CodeGenOpts<"DisableLifetimeMarkers">>;
  5166. def disable_O0_optnone : Flag<["-"], "disable-O0-optnone">,
  5167. HelpText<"Disable adding the optnone attribute to functions at O0">,
  5168. MarshallingInfoFlag<CodeGenOpts<"DisableO0ImplyOptNone">>;
  5169. def disable_red_zone : Flag<["-"], "disable-red-zone">,
  5170. HelpText<"Do not emit code that uses the red zone.">,
  5171. MarshallingInfoFlag<CodeGenOpts<"DisableRedZone">>;
  5172. def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
  5173. HelpText<"Generate debug info with external references to clang modules"
  5174. " or precompiled headers">,
  5175. MarshallingInfoFlag<CodeGenOpts<"DebugTypeExtRefs">>;
  5176. def dwarf_explicit_import : Flag<["-"], "dwarf-explicit-import">,
  5177. HelpText<"Generate explicit import from anonymous namespace to containing"
  5178. " scope">,
  5179. MarshallingInfoFlag<CodeGenOpts<"DebugExplicitImport">>;
  5180. def debug_forward_template_params : Flag<["-"], "debug-forward-template-params">,
  5181. HelpText<"Emit complete descriptions of template parameters in forward"
  5182. " declarations">,
  5183. MarshallingInfoFlag<CodeGenOpts<"DebugFwdTemplateParams">>;
  5184. def fforbid_guard_variables : Flag<["-"], "fforbid-guard-variables">,
  5185. HelpText<"Emit an error if a C++ static local initializer would need a guard variable">,
  5186. MarshallingInfoFlag<CodeGenOpts<"ForbidGuardVariables">>;
  5187. def no_implicit_float : Flag<["-"], "no-implicit-float">,
  5188. HelpText<"Don't generate implicit floating point or vector instructions">,
  5189. MarshallingInfoFlag<CodeGenOpts<"NoImplicitFloat">>;
  5190. def fdump_vtable_layouts : Flag<["-"], "fdump-vtable-layouts">,
  5191. HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">,
  5192. MarshallingInfoFlag<LangOpts<"DumpVTableLayouts">>;
  5193. def fmerge_functions : Flag<["-"], "fmerge-functions">,
  5194. HelpText<"Permit merging of identical functions when optimizing.">,
  5195. MarshallingInfoFlag<CodeGenOpts<"MergeFunctions">>;
  5196. def coverage_data_file : Separate<["-"], "coverage-data-file">,
  5197. HelpText<"Emit coverage data to this filename.">,
  5198. MarshallingInfoString<CodeGenOpts<"CoverageDataFile">>,
  5199. ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
  5200. def coverage_data_file_EQ : Joined<["-"], "coverage-data-file=">,
  5201. Alias<coverage_data_file>;
  5202. def coverage_notes_file : Separate<["-"], "coverage-notes-file">,
  5203. HelpText<"Emit coverage notes to this filename.">,
  5204. MarshallingInfoString<CodeGenOpts<"CoverageNotesFile">>,
  5205. ShouldParseIf<!strconcat(fprofile_arcs.KeyPath, "||", ftest_coverage.KeyPath)>;
  5206. def coverage_notes_file_EQ : Joined<["-"], "coverage-notes-file=">,
  5207. Alias<coverage_notes_file>;
  5208. def coverage_version_EQ : Joined<["-"], "coverage-version=">,
  5209. HelpText<"Four-byte version string for gcov files.">;
  5210. def dump_coverage_mapping : Flag<["-"], "dump-coverage-mapping">,
  5211. HelpText<"Dump the coverage mapping records, for testing">,
  5212. MarshallingInfoFlag<CodeGenOpts<"DumpCoverageMapping">>;
  5213. def fuse_register_sized_bitfield_access: Flag<["-"], "fuse-register-sized-bitfield-access">,
  5214. HelpText<"Use register sized accesses to bit-fields, when possible.">,
  5215. MarshallingInfoFlag<CodeGenOpts<"UseRegisterSizedBitfieldAccess">>;
  5216. def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
  5217. HelpText<"Turn off Type Based Alias Analysis">,
  5218. MarshallingInfoFlag<CodeGenOpts<"RelaxedAliasing">>;
  5219. def no_struct_path_tbaa : Flag<["-"], "no-struct-path-tbaa">,
  5220. HelpText<"Turn off struct-path aware Type Based Alias Analysis">,
  5221. MarshallingInfoNegativeFlag<CodeGenOpts<"StructPathTBAA">>;
  5222. def new_struct_path_tbaa : Flag<["-"], "new-struct-path-tbaa">,
  5223. HelpText<"Enable enhanced struct-path aware Type Based Alias Analysis">;
  5224. def mdebug_pass : Separate<["-"], "mdebug-pass">,
  5225. HelpText<"Enable additional debug output">,
  5226. MarshallingInfoString<CodeGenOpts<"DebugPass">>;
  5227. def mframe_pointer_EQ : Joined<["-"], "mframe-pointer=">,
  5228. HelpText<"Specify which frame pointers to retain.">, Values<"all,non-leaf,none">,
  5229. NormalizedValuesScope<"CodeGenOptions::FramePointerKind">, NormalizedValues<["All", "NonLeaf", "None"]>,
  5230. MarshallingInfoEnum<CodeGenOpts<"FramePointer">, "None">;
  5231. def mabi_EQ_ieeelongdouble : Flag<["-"], "mabi=ieeelongdouble">,
  5232. HelpText<"Use IEEE 754 quadruple-precision for long double">,
  5233. MarshallingInfoFlag<LangOpts<"PPCIEEELongDouble">>;
  5234. def mfloat_abi : Separate<["-"], "mfloat-abi">,
  5235. HelpText<"The float ABI to use">,
  5236. MarshallingInfoString<CodeGenOpts<"FloatABI">>;
  5237. def mtp : Separate<["-"], "mtp">,
  5238. HelpText<"Mode for reading thread pointer">;
  5239. def mlimit_float_precision : Separate<["-"], "mlimit-float-precision">,
  5240. HelpText<"Limit float precision to the given value">,
  5241. MarshallingInfoString<CodeGenOpts<"LimitFloatPrecision">>;
  5242. def mregparm : Separate<["-"], "mregparm">,
  5243. HelpText<"Limit the number of registers available for integer arguments">,
  5244. MarshallingInfoInt<CodeGenOpts<"NumRegisterParameters">>;
  5245. def msmall_data_limit : Separate<["-"], "msmall-data-limit">,
  5246. HelpText<"Put global and static data smaller than the limit into a special section">,
  5247. MarshallingInfoInt<CodeGenOpts<"SmallDataLimit">>;
  5248. def funwind_tables_EQ : Joined<["-"], "funwind-tables=">,
  5249. HelpText<"Generate unwinding tables for all functions">,
  5250. MarshallingInfoInt<CodeGenOpts<"UnwindTables">>;
  5251. defm constructor_aliases : BoolOption<"m", "constructor-aliases",
  5252. CodeGenOpts<"CXXCtorDtorAliases">, DefaultFalse,
  5253. PosFlag<SetTrue, [], "Enable">, NegFlag<SetFalse, [], "Disable">,
  5254. BothFlags<[CC1Option], " emitting complete constructors and destructors as aliases when possible">>;
  5255. def mlink_bitcode_file : Separate<["-"], "mlink-bitcode-file">,
  5256. HelpText<"Link the given bitcode file before performing optimizations.">;
  5257. def mlink_builtin_bitcode : Separate<["-"], "mlink-builtin-bitcode">,
  5258. HelpText<"Link and internalize needed symbols from the given bitcode file "
  5259. "before performing optimizations.">;
  5260. def vectorize_loops : Flag<["-"], "vectorize-loops">,
  5261. HelpText<"Run the Loop vectorization passes">,
  5262. MarshallingInfoFlag<CodeGenOpts<"VectorizeLoop">>;
  5263. def vectorize_slp : Flag<["-"], "vectorize-slp">,
  5264. HelpText<"Run the SLP vectorization passes">,
  5265. MarshallingInfoFlag<CodeGenOpts<"VectorizeSLP">>;
  5266. def dependent_lib : Joined<["--"], "dependent-lib=">,
  5267. HelpText<"Add dependent library">,
  5268. MarshallingInfoStringVector<CodeGenOpts<"DependentLibraries">>;
  5269. def linker_option : Joined<["--"], "linker-option=">,
  5270. HelpText<"Add linker option">,
  5271. MarshallingInfoStringVector<CodeGenOpts<"LinkerOptions">>;
  5272. def fsanitize_coverage_type : Joined<["-"], "fsanitize-coverage-type=">,
  5273. HelpText<"Sanitizer coverage type">,
  5274. MarshallingInfoInt<CodeGenOpts<"SanitizeCoverageType">>;
  5275. def fsanitize_coverage_indirect_calls
  5276. : Flag<["-"], "fsanitize-coverage-indirect-calls">,
  5277. HelpText<"Enable sanitizer coverage for indirect calls">,
  5278. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageIndirectCalls">>;
  5279. def fsanitize_coverage_trace_bb
  5280. : Flag<["-"], "fsanitize-coverage-trace-bb">,
  5281. HelpText<"Enable basic block tracing in sanitizer coverage">,
  5282. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceBB">>;
  5283. def fsanitize_coverage_trace_cmp
  5284. : Flag<["-"], "fsanitize-coverage-trace-cmp">,
  5285. HelpText<"Enable cmp instruction tracing in sanitizer coverage">,
  5286. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceCmp">>;
  5287. def fsanitize_coverage_trace_div
  5288. : Flag<["-"], "fsanitize-coverage-trace-div">,
  5289. HelpText<"Enable div instruction tracing in sanitizer coverage">,
  5290. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceDiv">>;
  5291. def fsanitize_coverage_trace_gep
  5292. : Flag<["-"], "fsanitize-coverage-trace-gep">,
  5293. HelpText<"Enable gep instruction tracing in sanitizer coverage">,
  5294. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceGep">>;
  5295. def fsanitize_coverage_8bit_counters
  5296. : Flag<["-"], "fsanitize-coverage-8bit-counters">,
  5297. HelpText<"Enable frequency counters in sanitizer coverage">,
  5298. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverage8bitCounters">>;
  5299. def fsanitize_coverage_inline_8bit_counters
  5300. : Flag<["-"], "fsanitize-coverage-inline-8bit-counters">,
  5301. HelpText<"Enable inline 8-bit counters in sanitizer coverage">,
  5302. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInline8bitCounters">>;
  5303. def fsanitize_coverage_inline_bool_flag
  5304. : Flag<["-"], "fsanitize-coverage-inline-bool-flag">,
  5305. HelpText<"Enable inline bool flag in sanitizer coverage">,
  5306. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageInlineBoolFlag">>;
  5307. def fsanitize_coverage_pc_table
  5308. : Flag<["-"], "fsanitize-coverage-pc-table">,
  5309. HelpText<"Create a table of coverage-instrumented PCs">,
  5310. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoveragePCTable">>;
  5311. def fsanitize_coverage_control_flow
  5312. : Flag<["-"], "fsanitize-coverage-control-flow">,
  5313. HelpText<"Collect control flow of function">,
  5314. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageControlFlow">>;
  5315. def fsanitize_coverage_trace_pc
  5316. : Flag<["-"], "fsanitize-coverage-trace-pc">,
  5317. HelpText<"Enable PC tracing in sanitizer coverage">,
  5318. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePC">>;
  5319. def fsanitize_coverage_trace_pc_guard
  5320. : Flag<["-"], "fsanitize-coverage-trace-pc-guard">,
  5321. HelpText<"Enable PC tracing with guard in sanitizer coverage">,
  5322. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTracePCGuard">>;
  5323. def fsanitize_coverage_no_prune
  5324. : Flag<["-"], "fsanitize-coverage-no-prune">,
  5325. HelpText<"Disable coverage pruning (i.e. instrument all blocks/edges)">,
  5326. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageNoPrune">>;
  5327. def fsanitize_coverage_stack_depth
  5328. : Flag<["-"], "fsanitize-coverage-stack-depth">,
  5329. HelpText<"Enable max stack depth tracing">,
  5330. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageStackDepth">>;
  5331. def fsanitize_coverage_trace_loads
  5332. : Flag<["-"], "fsanitize-coverage-trace-loads">,
  5333. HelpText<"Enable tracing of loads">,
  5334. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceLoads">>;
  5335. def fsanitize_coverage_trace_stores
  5336. : Flag<["-"], "fsanitize-coverage-trace-stores">,
  5337. HelpText<"Enable tracing of stores">,
  5338. MarshallingInfoFlag<CodeGenOpts<"SanitizeCoverageTraceStores">>;
  5339. def fexperimental_sanitize_metadata_EQ_covered
  5340. : Flag<["-"], "fexperimental-sanitize-metadata=covered">,
  5341. HelpText<"Emit PCs for code covered with binary analysis sanitizers">,
  5342. MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataCovered">>;
  5343. def fexperimental_sanitize_metadata_EQ_atomics
  5344. : Flag<["-"], "fexperimental-sanitize-metadata=atomics">,
  5345. HelpText<"Emit PCs for atomic operations used by binary analysis sanitizers">,
  5346. MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataAtomics">>;
  5347. def fexperimental_sanitize_metadata_EQ_uar
  5348. : Flag<["-"], "fexperimental-sanitize-metadata=uar">,
  5349. HelpText<"Emit PCs for start of functions that are subject for use-after-return checking.">,
  5350. MarshallingInfoFlag<CodeGenOpts<"SanitizeBinaryMetadataUAR">>;
  5351. def fpatchable_function_entry_offset_EQ
  5352. : Joined<["-"], "fpatchable-function-entry-offset=">, MetaVarName<"<M>">,
  5353. HelpText<"Generate M NOPs before function entry">,
  5354. MarshallingInfoInt<CodeGenOpts<"PatchableFunctionEntryOffset">>;
  5355. def fprofile_instrument_EQ : Joined<["-"], "fprofile-instrument=">,
  5356. HelpText<"Enable PGO instrumentation">, Values<"none,clang,llvm,csllvm">,
  5357. NormalizedValuesScope<"CodeGenOptions">,
  5358. NormalizedValues<["ProfileNone", "ProfileClangInstr", "ProfileIRInstr", "ProfileCSIRInstr"]>,
  5359. MarshallingInfoEnum<CodeGenOpts<"ProfileInstr">, "ProfileNone">;
  5360. def fprofile_instrument_path_EQ : Joined<["-"], "fprofile-instrument-path=">,
  5361. HelpText<"Generate instrumented code to collect execution counts into "
  5362. "<file> (overridden by LLVM_PROFILE_FILE env var)">,
  5363. MarshallingInfoString<CodeGenOpts<"InstrProfileOutput">>;
  5364. def fprofile_instrument_use_path_EQ :
  5365. Joined<["-"], "fprofile-instrument-use-path=">,
  5366. HelpText<"Specify the profile path in PGO use compilation">,
  5367. MarshallingInfoString<CodeGenOpts<"ProfileInstrumentUsePath">>;
  5368. def flto_visibility_public_std:
  5369. Flag<["-"], "flto-visibility-public-std">,
  5370. HelpText<"Use public LTO visibility for classes in std and stdext namespaces">,
  5371. MarshallingInfoFlag<CodeGenOpts<"LTOVisibilityPublicStd">>;
  5372. defm lto_unit : BoolOption<"f", "lto-unit",
  5373. CodeGenOpts<"LTOUnit">, DefaultFalse,
  5374. PosFlag<SetTrue, [CC1Option], "Emit IR to support LTO unit features (CFI, whole program vtable opt)">,
  5375. NegFlag<SetFalse>>;
  5376. def fverify_debuginfo_preserve
  5377. : Flag<["-"], "fverify-debuginfo-preserve">,
  5378. HelpText<"Enable Debug Info Metadata preservation testing in "
  5379. "optimizations.">,
  5380. MarshallingInfoFlag<CodeGenOpts<"EnableDIPreservationVerify">>;
  5381. def fverify_debuginfo_preserve_export
  5382. : Joined<["-"], "fverify-debuginfo-preserve-export=">,
  5383. MetaVarName<"<file>">,
  5384. HelpText<"Export debug info (by testing original Debug Info) failures "
  5385. "into specified (JSON) file (should be abs path as we use "
  5386. "append mode to insert new JSON objects).">,
  5387. MarshallingInfoString<CodeGenOpts<"DIBugsReportFilePath">>;
  5388. def fwarn_stack_size_EQ
  5389. : Joined<["-"], "fwarn-stack-size=">,
  5390. MarshallingInfoInt<CodeGenOpts<"WarnStackSize">, "UINT_MAX">;
  5391. // The driver option takes the key as a parameter to the -msign-return-address=
  5392. // and -mbranch-protection= options, but CC1 has a separate option so we
  5393. // don't have to parse the parameter twice.
  5394. def msign_return_address_key_EQ : Joined<["-"], "msign-return-address-key=">,
  5395. Values<"a_key,b_key">;
  5396. def mbranch_target_enforce : Flag<["-"], "mbranch-target-enforce">,
  5397. MarshallingInfoFlag<LangOpts<"BranchTargetEnforcement">>;
  5398. def fno_dllexport_inlines : Flag<["-"], "fno-dllexport-inlines">,
  5399. MarshallingInfoNegativeFlag<LangOpts<"DllExportInlines">>;
  5400. def cfguard_no_checks : Flag<["-"], "cfguard-no-checks">,
  5401. HelpText<"Emit Windows Control Flow Guard tables only (no checks)">,
  5402. MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuardNoChecks">>;
  5403. def cfguard : Flag<["-"], "cfguard">,
  5404. HelpText<"Emit Windows Control Flow Guard tables and checks">,
  5405. MarshallingInfoFlag<CodeGenOpts<"ControlFlowGuard">>;
  5406. def ehcontguard : Flag<["-"], "ehcontguard">,
  5407. HelpText<"Emit Windows EH Continuation Guard tables">,
  5408. MarshallingInfoFlag<CodeGenOpts<"EHContGuard">>;
  5409. def fdenormal_fp_math_f32_EQ : Joined<["-"], "fdenormal-fp-math-f32=">,
  5410. Group<f_Group>;
  5411. def fctor_dtor_return_this : Flag<["-"], "fctor-dtor-return-this">,
  5412. HelpText<"Change the C++ ABI to returning `this` pointer from constructors "
  5413. "and non-deleting destructors. (No effect on Microsoft ABI)">,
  5414. MarshallingInfoFlag<CodeGenOpts<"CtorDtorReturnThis">>;
  5415. defm experimental_assignment_tracking :
  5416. BoolOption<"f", "experimental-assignment-tracking",
  5417. CodeGenOpts<"EnableAssignmentTracking">, DefaultFalse,
  5418. PosFlag<SetTrue, [CC1Option]>, NegFlag<SetFalse>, BothFlags<[CoreOption]>>,
  5419. Group<f_Group>;
  5420. } // let Flags = [CC1Option, NoDriverOption]
  5421. //===----------------------------------------------------------------------===//
  5422. // Dependency Output Options
  5423. //===----------------------------------------------------------------------===//
  5424. let Flags = [CC1Option, NoDriverOption] in {
  5425. def sys_header_deps : Flag<["-"], "sys-header-deps">,
  5426. HelpText<"Include system headers in dependency output">,
  5427. MarshallingInfoFlag<DependencyOutputOpts<"IncludeSystemHeaders">>;
  5428. def module_file_deps : Flag<["-"], "module-file-deps">,
  5429. HelpText<"Include module files in dependency output">,
  5430. MarshallingInfoFlag<DependencyOutputOpts<"IncludeModuleFiles">>;
  5431. def header_include_file : Separate<["-"], "header-include-file">,
  5432. HelpText<"Filename (or -) to write header include output to">,
  5433. MarshallingInfoString<DependencyOutputOpts<"HeaderIncludeOutputFile">>;
  5434. def header_include_format_EQ : Joined<["-"], "header-include-format=">,
  5435. HelpText<"set format in which header info is emitted">,
  5436. Values<"textual,json">, NormalizedValues<["HIFMT_Textual", "HIFMT_JSON"]>,
  5437. MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFormat">, "HIFMT_Textual">;
  5438. def header_include_filtering_EQ : Joined<["-"], "header-include-filtering=">,
  5439. HelpText<"set the flag that enables filtering header information">,
  5440. Values<"none,only-direct-system">, NormalizedValues<["HIFIL_None", "HIFIL_Only_Direct_System"]>,
  5441. MarshallingInfoEnum<DependencyOutputOpts<"HeaderIncludeFiltering">, "HIFIL_None">;
  5442. def show_includes : Flag<["--"], "show-includes">,
  5443. HelpText<"Print cl.exe style /showIncludes to stdout">;
  5444. } // let Flags = [CC1Option, NoDriverOption]
  5445. //===----------------------------------------------------------------------===//
  5446. // Diagnostic Options
  5447. //===----------------------------------------------------------------------===//
  5448. let Flags = [CC1Option, NoDriverOption] in {
  5449. def diagnostic_log_file : Separate<["-"], "diagnostic-log-file">,
  5450. HelpText<"Filename (or -) to log diagnostics to">,
  5451. MarshallingInfoString<DiagnosticOpts<"DiagnosticLogFile">>;
  5452. def diagnostic_serialized_file : Separate<["-"], "serialize-diagnostic-file">,
  5453. MetaVarName<"<filename>">,
  5454. HelpText<"File for serializing diagnostics in a binary format">;
  5455. def fdiagnostics_format : Separate<["-"], "fdiagnostics-format">,
  5456. HelpText<"Change diagnostic formatting to match IDE and command line tools">,
  5457. Values<"clang,msvc,vi,sarif,SARIF">,
  5458. NormalizedValuesScope<"DiagnosticOptions">, NormalizedValues<["Clang", "MSVC", "Vi", "SARIF", "SARIF"]>,
  5459. MarshallingInfoEnum<DiagnosticOpts<"Format">, "Clang">;
  5460. def fdiagnostics_show_category : Separate<["-"], "fdiagnostics-show-category">,
  5461. HelpText<"Print diagnostic category">,
  5462. Values<"none,id,name">,
  5463. NormalizedValues<["0", "1", "2"]>,
  5464. MarshallingInfoEnum<DiagnosticOpts<"ShowCategories">, "0">;
  5465. def fno_diagnostics_use_presumed_location : Flag<["-"], "fno-diagnostics-use-presumed-location">,
  5466. HelpText<"Ignore #line directives when displaying diagnostic locations">,
  5467. MarshallingInfoNegativeFlag<DiagnosticOpts<"ShowPresumedLoc">>;
  5468. def ftabstop : Separate<["-"], "ftabstop">, MetaVarName<"<N>">,
  5469. HelpText<"Set the tab stop distance.">,
  5470. MarshallingInfoInt<DiagnosticOpts<"TabStop">, "DiagnosticOptions::DefaultTabStop">;
  5471. def ferror_limit : Separate<["-"], "ferror-limit">, MetaVarName<"<N>">,
  5472. HelpText<"Set the maximum number of errors to emit before stopping (0 = no limit).">,
  5473. MarshallingInfoInt<DiagnosticOpts<"ErrorLimit">>;
  5474. def fmacro_backtrace_limit : Separate<["-"], "fmacro-backtrace-limit">, MetaVarName<"<N>">,
  5475. HelpText<"Set the maximum number of entries to print in a macro expansion backtrace (0 = no limit).">,
  5476. MarshallingInfoInt<DiagnosticOpts<"MacroBacktraceLimit">, "DiagnosticOptions::DefaultMacroBacktraceLimit">;
  5477. def ftemplate_backtrace_limit : Separate<["-"], "ftemplate-backtrace-limit">, MetaVarName<"<N>">,
  5478. HelpText<"Set the maximum number of entries to print in a template instantiation backtrace (0 = no limit).">,
  5479. MarshallingInfoInt<DiagnosticOpts<"TemplateBacktraceLimit">, "DiagnosticOptions::DefaultTemplateBacktraceLimit">;
  5480. def fconstexpr_backtrace_limit : Separate<["-"], "fconstexpr-backtrace-limit">, MetaVarName<"<N>">,
  5481. HelpText<"Set the maximum number of entries to print in a constexpr evaluation backtrace (0 = no limit).">,
  5482. MarshallingInfoInt<DiagnosticOpts<"ConstexprBacktraceLimit">, "DiagnosticOptions::DefaultConstexprBacktraceLimit">;
  5483. def fspell_checking_limit : Separate<["-"], "fspell-checking-limit">, MetaVarName<"<N>">,
  5484. HelpText<"Set the maximum number of times to perform spell checking on unrecognized identifiers (0 = no limit).">,
  5485. MarshallingInfoInt<DiagnosticOpts<"SpellCheckingLimit">, "DiagnosticOptions::DefaultSpellCheckingLimit">;
  5486. def fcaret_diagnostics_max_lines :
  5487. Separate<["-"], "fcaret-diagnostics-max-lines">, MetaVarName<"<N>">,
  5488. HelpText<"Set the maximum number of source lines to show in a caret diagnostic">,
  5489. MarshallingInfoInt<DiagnosticOpts<"SnippetLineLimit">, "DiagnosticOptions::DefaultSnippetLineLimit">;
  5490. def verify_EQ : CommaJoined<["-"], "verify=">,
  5491. MetaVarName<"<prefixes>">,
  5492. HelpText<"Verify diagnostic output using comment directives that start with"
  5493. " prefixes in the comma-separated sequence <prefixes>">;
  5494. def verify : Flag<["-"], "verify">,
  5495. HelpText<"Equivalent to -verify=expected">;
  5496. def verify_ignore_unexpected : Flag<["-"], "verify-ignore-unexpected">,
  5497. HelpText<"Ignore unexpected diagnostic messages">;
  5498. def verify_ignore_unexpected_EQ : CommaJoined<["-"], "verify-ignore-unexpected=">,
  5499. HelpText<"Ignore unexpected diagnostic messages">;
  5500. def Wno_rewrite_macros : Flag<["-"], "Wno-rewrite-macros">,
  5501. HelpText<"Silence ObjC rewriting warnings">,
  5502. MarshallingInfoFlag<DiagnosticOpts<"NoRewriteMacros">>;
  5503. } // let Flags = [CC1Option, NoDriverOption]
  5504. //===----------------------------------------------------------------------===//
  5505. // Frontend Options
  5506. //===----------------------------------------------------------------------===//
  5507. let Flags = [CC1Option, NoDriverOption] in {
  5508. // This isn't normally used, it is just here so we can parse a
  5509. // CompilerInvocation out of a driver-derived argument vector.
  5510. def cc1 : Flag<["-"], "cc1">;
  5511. def cc1as : Flag<["-"], "cc1as">;
  5512. def ast_merge : Separate<["-"], "ast-merge">,
  5513. MetaVarName<"<ast file>">,
  5514. HelpText<"Merge the given AST file into the translation unit being compiled.">,
  5515. MarshallingInfoStringVector<FrontendOpts<"ASTMergeFiles">>;
  5516. def aux_target_cpu : Separate<["-"], "aux-target-cpu">,
  5517. HelpText<"Target a specific auxiliary cpu type">;
  5518. def aux_target_feature : Separate<["-"], "aux-target-feature">,
  5519. HelpText<"Target specific auxiliary attributes">;
  5520. def aux_triple : Separate<["-"], "aux-triple">,
  5521. HelpText<"Auxiliary target triple.">,
  5522. MarshallingInfoString<FrontendOpts<"AuxTriple">>;
  5523. def code_completion_at : Separate<["-"], "code-completion-at">,
  5524. MetaVarName<"<file>:<line>:<column>">,
  5525. HelpText<"Dump code-completion information at a location">;
  5526. def remap_file : Separate<["-"], "remap-file">,
  5527. MetaVarName<"<from>;<to>">,
  5528. HelpText<"Replace the contents of the <from> file with the contents of the <to> file">;
  5529. def code_completion_at_EQ : Joined<["-"], "code-completion-at=">,
  5530. Alias<code_completion_at>;
  5531. def code_completion_macros : Flag<["-"], "code-completion-macros">,
  5532. HelpText<"Include macros in code-completion results">,
  5533. MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeMacros">>;
  5534. def code_completion_patterns : Flag<["-"], "code-completion-patterns">,
  5535. HelpText<"Include code patterns in code-completion results">,
  5536. MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeCodePatterns">>;
  5537. def no_code_completion_globals : Flag<["-"], "no-code-completion-globals">,
  5538. HelpText<"Do not include global declarations in code-completion results.">,
  5539. MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeGlobals">>;
  5540. def no_code_completion_ns_level_decls : Flag<["-"], "no-code-completion-ns-level-decls">,
  5541. HelpText<"Do not include declarations inside namespaces (incl. global namespace) in the code-completion results.">,
  5542. MarshallingInfoNegativeFlag<FrontendOpts<"CodeCompleteOpts.IncludeNamespaceLevelDecls">>;
  5543. def code_completion_brief_comments : Flag<["-"], "code-completion-brief-comments">,
  5544. HelpText<"Include brief documentation comments in code-completion results.">,
  5545. MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeBriefComments">>;
  5546. def code_completion_with_fixits : Flag<["-"], "code-completion-with-fixits">,
  5547. HelpText<"Include code completion results which require small fix-its.">,
  5548. MarshallingInfoFlag<FrontendOpts<"CodeCompleteOpts.IncludeFixIts">>;
  5549. def disable_free : Flag<["-"], "disable-free">,
  5550. HelpText<"Disable freeing of memory on exit">,
  5551. MarshallingInfoFlag<FrontendOpts<"DisableFree">>;
  5552. defm clear_ast_before_backend : BoolOption<"",
  5553. "clear-ast-before-backend",
  5554. CodeGenOpts<"ClearASTBeforeBackend">,
  5555. DefaultFalse,
  5556. PosFlag<SetTrue, [], "Clear">,
  5557. NegFlag<SetFalse, [], "Don't clear">,
  5558. BothFlags<[], " the Clang AST before running backend code generation">>;
  5559. defm enable_noundef_analysis : BoolOption<"",
  5560. "enable-noundef-analysis",
  5561. CodeGenOpts<"EnableNoundefAttrs">,
  5562. DefaultTrue,
  5563. PosFlag<SetTrue, [], "Enable">,
  5564. NegFlag<SetFalse, [], "Disable">,
  5565. BothFlags<[], " analyzing function argument and return types for mandatory definedness">>;
  5566. defm opaque_pointers : BoolOption<"",
  5567. "opaque-pointers",
  5568. CodeGenOpts<"OpaquePointers">,
  5569. DefaultTrue,
  5570. PosFlag<SetTrue, [], "Enable">,
  5571. NegFlag<SetFalse, [], "Disable">,
  5572. BothFlags<[], " opaque pointers">>;
  5573. def discard_value_names : Flag<["-"], "discard-value-names">,
  5574. HelpText<"Discard value names in LLVM IR">,
  5575. MarshallingInfoFlag<CodeGenOpts<"DiscardValueNames">>;
  5576. def plugin_arg : JoinedAndSeparate<["-"], "plugin-arg-">,
  5577. MetaVarName<"<name> <arg>">,
  5578. HelpText<"Pass <arg> to plugin <name>">;
  5579. def add_plugin : Separate<["-"], "add-plugin">, MetaVarName<"<name>">,
  5580. HelpText<"Use the named plugin action in addition to the default action">,
  5581. MarshallingInfoStringVector<FrontendOpts<"AddPluginActions">>;
  5582. def ast_dump_filter : Separate<["-"], "ast-dump-filter">,
  5583. MetaVarName<"<dump_filter>">,
  5584. HelpText<"Use with -ast-dump or -ast-print to dump/print only AST declaration"
  5585. " nodes having a certain substring in a qualified name. Use"
  5586. " -ast-list to list all filterable declaration node names.">,
  5587. MarshallingInfoString<FrontendOpts<"ASTDumpFilter">>;
  5588. def ast_dump_filter_EQ : Joined<["-"], "ast-dump-filter=">,
  5589. Alias<ast_dump_filter>;
  5590. def fno_modules_global_index : Flag<["-"], "fno-modules-global-index">,
  5591. HelpText<"Do not automatically generate or update the global module index">,
  5592. MarshallingInfoNegativeFlag<FrontendOpts<"UseGlobalModuleIndex">>;
  5593. def fno_modules_error_recovery : Flag<["-"], "fno-modules-error-recovery">,
  5594. HelpText<"Do not automatically import modules for error recovery">,
  5595. MarshallingInfoNegativeFlag<LangOpts<"ModulesErrorRecovery">>;
  5596. def fmodule_map_file_home_is_cwd : Flag<["-"], "fmodule-map-file-home-is-cwd">,
  5597. HelpText<"Use the current working directory as the home directory of "
  5598. "module maps specified by -fmodule-map-file=<FILE>">,
  5599. MarshallingInfoFlag<HeaderSearchOpts<"ModuleMapFileHomeIsCwd">>;
  5600. def fmodule_file_home_is_cwd : Flag<["-"], "fmodule-file-home-is-cwd">,
  5601. HelpText<"Use the current working directory as the base directory of "
  5602. "compiled module files.">,
  5603. MarshallingInfoFlag<HeaderSearchOpts<"ModuleFileHomeIsCwd">>;
  5604. def fmodule_feature : Separate<["-"], "fmodule-feature">,
  5605. MetaVarName<"<feature>">,
  5606. HelpText<"Enable <feature> in module map requires declarations">,
  5607. MarshallingInfoStringVector<LangOpts<"ModuleFeatures">>;
  5608. def fmodules_embed_file_EQ : Joined<["-"], "fmodules-embed-file=">,
  5609. MetaVarName<"<file>">,
  5610. HelpText<"Embed the contents of the specified file into the module file "
  5611. "being compiled.">,
  5612. MarshallingInfoStringVector<FrontendOpts<"ModulesEmbedFiles">>;
  5613. def fmodules_embed_all_files : Joined<["-"], "fmodules-embed-all-files">,
  5614. HelpText<"Embed the contents of all files read by this compilation into "
  5615. "the produced module file.">,
  5616. MarshallingInfoFlag<FrontendOpts<"ModulesEmbedAllFiles">>;
  5617. defm fimplicit_modules_use_lock : BoolOption<"f", "implicit-modules-use-lock",
  5618. FrontendOpts<"BuildingImplicitModuleUsesLock">, DefaultTrue,
  5619. NegFlag<SetFalse>,
  5620. PosFlag<SetTrue, [],
  5621. "Use filesystem locks for implicit modules builds to avoid "
  5622. "duplicating work in competing clang invocations.">>;
  5623. // FIXME: We only need this in C++ modules / Modules TS if we might textually
  5624. // enter a different module (eg, when building a header unit).
  5625. def fmodules_local_submodule_visibility :
  5626. Flag<["-"], "fmodules-local-submodule-visibility">,
  5627. HelpText<"Enforce name visibility rules across submodules of the same "
  5628. "top-level module.">,
  5629. MarshallingInfoFlag<LangOpts<"ModulesLocalVisibility">>,
  5630. ImpliedByAnyOf<[fmodules_ts.KeyPath, fcxx_modules.KeyPath]>;
  5631. def fmodules_codegen :
  5632. Flag<["-"], "fmodules-codegen">,
  5633. HelpText<"Generate code for uses of this module that assumes an explicit "
  5634. "object file will be built for the module">,
  5635. MarshallingInfoFlag<LangOpts<"ModulesCodegen">>;
  5636. def fmodules_debuginfo :
  5637. Flag<["-"], "fmodules-debuginfo">,
  5638. HelpText<"Generate debug info for types in an object file built from this "
  5639. "module and do not generate them elsewhere">,
  5640. MarshallingInfoFlag<LangOpts<"ModulesDebugInfo">>;
  5641. def fmodule_format_EQ : Joined<["-"], "fmodule-format=">,
  5642. HelpText<"Select the container format for clang modules and PCH. "
  5643. "Supported options are 'raw' and 'obj'.">,
  5644. MarshallingInfoString<HeaderSearchOpts<"ModuleFormat">, [{"raw"}]>;
  5645. def ftest_module_file_extension_EQ :
  5646. Joined<["-"], "ftest-module-file-extension=">,
  5647. HelpText<"introduce a module file extension for testing purposes. "
  5648. "The argument is parsed as blockname:major:minor:hashed:user info">;
  5649. defm recovery_ast : BoolOption<"f", "recovery-ast",
  5650. LangOpts<"RecoveryAST">, DefaultTrue,
  5651. NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve expressions in AST rather "
  5652. "than dropping them when encountering semantic errors">>;
  5653. defm recovery_ast_type : BoolOption<"f", "recovery-ast-type",
  5654. LangOpts<"RecoveryASTType">, DefaultTrue,
  5655. NegFlag<SetFalse>, PosFlag<SetTrue, [], "Preserve the type for recovery "
  5656. "expressions when possible">>;
  5657. let Group = Action_Group in {
  5658. def Eonly : Flag<["-"], "Eonly">,
  5659. HelpText<"Just run preprocessor, no output (for timings)">;
  5660. def dump_raw_tokens : Flag<["-"], "dump-raw-tokens">,
  5661. HelpText<"Lex file in raw mode and dump raw tokens">;
  5662. def analyze : Flag<["-"], "analyze">,
  5663. HelpText<"Run static analysis engine">;
  5664. def dump_tokens : Flag<["-"], "dump-tokens">,
  5665. HelpText<"Run preprocessor, dump internal rep of tokens">;
  5666. def fixit : Flag<["-"], "fixit">,
  5667. HelpText<"Apply fix-it advice to the input source">;
  5668. def fixit_EQ : Joined<["-"], "fixit=">,
  5669. HelpText<"Apply fix-it advice creating a file with the given suffix">;
  5670. def print_preamble : Flag<["-"], "print-preamble">,
  5671. HelpText<"Print the \"preamble\" of a file, which is a candidate for implicit"
  5672. " precompiled headers.">;
  5673. def emit_html : Flag<["-"], "emit-html">,
  5674. HelpText<"Output input source as HTML">;
  5675. def ast_print : Flag<["-"], "ast-print">,
  5676. HelpText<"Build ASTs and then pretty-print them">;
  5677. def ast_list : Flag<["-"], "ast-list">,
  5678. HelpText<"Build ASTs and print the list of declaration node qualified names">;
  5679. def ast_dump : Flag<["-"], "ast-dump">,
  5680. HelpText<"Build ASTs and then debug dump them">;
  5681. def ast_dump_EQ : Joined<["-"], "ast-dump=">,
  5682. HelpText<"Build ASTs and then debug dump them in the specified format. "
  5683. "Supported formats include: default, json">;
  5684. def ast_dump_all : Flag<["-"], "ast-dump-all">,
  5685. HelpText<"Build ASTs and then debug dump them, forcing deserialization">;
  5686. def ast_dump_all_EQ : Joined<["-"], "ast-dump-all=">,
  5687. HelpText<"Build ASTs and then debug dump them in the specified format, "
  5688. "forcing deserialization. Supported formats include: default, json">;
  5689. def ast_dump_decl_types : Flag<["-"], "ast-dump-decl-types">,
  5690. HelpText<"Include declaration types in AST dumps">,
  5691. MarshallingInfoFlag<FrontendOpts<"ASTDumpDeclTypes">>;
  5692. def templight_dump : Flag<["-"], "templight-dump">,
  5693. HelpText<"Dump templight information to stdout">;
  5694. def ast_dump_lookups : Flag<["-"], "ast-dump-lookups">,
  5695. HelpText<"Build ASTs and then debug dump their name lookup tables">,
  5696. MarshallingInfoFlag<FrontendOpts<"ASTDumpLookups">>;
  5697. def ast_view : Flag<["-"], "ast-view">,
  5698. HelpText<"Build ASTs and view them with GraphViz">;
  5699. def emit_module : Flag<["-"], "emit-module">,
  5700. HelpText<"Generate pre-compiled module file from a module map">;
  5701. def emit_module_interface : Flag<["-"], "emit-module-interface">,
  5702. HelpText<"Generate pre-compiled module file from a C++ module interface">;
  5703. def emit_header_unit : Flag<["-"], "emit-header-unit">,
  5704. HelpText<"Generate C++20 header units from header files">;
  5705. def emit_pch : Flag<["-"], "emit-pch">,
  5706. HelpText<"Generate pre-compiled header file">;
  5707. def emit_llvm_only : Flag<["-"], "emit-llvm-only">,
  5708. HelpText<"Build ASTs and convert to LLVM, discarding output">;
  5709. def emit_codegen_only : Flag<["-"], "emit-codegen-only">,
  5710. HelpText<"Generate machine code, but discard output">;
  5711. def rewrite_test : Flag<["-"], "rewrite-test">,
  5712. HelpText<"Rewriter playground">;
  5713. def rewrite_macros : Flag<["-"], "rewrite-macros">,
  5714. HelpText<"Expand macros without full preprocessing">;
  5715. def migrate : Flag<["-"], "migrate">,
  5716. HelpText<"Migrate source code">;
  5717. def compiler_options_dump : Flag<["-"], "compiler-options-dump">,
  5718. HelpText<"Dump the compiler configuration options">;
  5719. def print_dependency_directives_minimized_source : Flag<["-"],
  5720. "print-dependency-directives-minimized-source">,
  5721. HelpText<"Print the output of the dependency directives source minimizer">;
  5722. }
  5723. defm emit_llvm_uselists : BoolOption<"", "emit-llvm-uselists",
  5724. CodeGenOpts<"EmitLLVMUseLists">, DefaultFalse,
  5725. PosFlag<SetTrue, [], "Preserve">,
  5726. NegFlag<SetFalse, [], "Don't preserve">,
  5727. BothFlags<[], " order of LLVM use-lists when serializing">>;
  5728. def mt_migrate_directory : Separate<["-"], "mt-migrate-directory">,
  5729. HelpText<"Directory for temporary files produced during ARC or ObjC migration">,
  5730. MarshallingInfoString<FrontendOpts<"MTMigrateDir">>;
  5731. def arcmt_action_EQ : Joined<["-"], "arcmt-action=">, Flags<[CC1Option, NoDriverOption]>,
  5732. HelpText<"The ARC migration action to take">,
  5733. Values<"check,modify,migrate">,
  5734. NormalizedValuesScope<"FrontendOptions">,
  5735. NormalizedValues<["ARCMT_Check", "ARCMT_Modify", "ARCMT_Migrate"]>,
  5736. MarshallingInfoEnum<FrontendOpts<"ARCMTAction">, "ARCMT_None">;
  5737. def opt_record_file : Separate<["-"], "opt-record-file">,
  5738. HelpText<"File name to use for YAML optimization record output">,
  5739. MarshallingInfoString<CodeGenOpts<"OptRecordFile">>;
  5740. def opt_record_passes : Separate<["-"], "opt-record-passes">,
  5741. HelpText<"Only record remark information for passes whose names match the given regular expression">;
  5742. def opt_record_format : Separate<["-"], "opt-record-format">,
  5743. HelpText<"The format used for serializing remarks (default: YAML)">;
  5744. def print_stats : Flag<["-"], "print-stats">,
  5745. HelpText<"Print performance metrics and statistics">,
  5746. MarshallingInfoFlag<FrontendOpts<"ShowStats">>;
  5747. def stats_file : Joined<["-"], "stats-file=">,
  5748. HelpText<"Filename to write statistics to">,
  5749. MarshallingInfoString<FrontendOpts<"StatsFile">>;
  5750. def fdump_record_layouts_simple : Flag<["-"], "fdump-record-layouts-simple">,
  5751. HelpText<"Dump record layout information in a simple form used for testing">,
  5752. MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsSimple">>;
  5753. def fdump_record_layouts_canonical : Flag<["-"], "fdump-record-layouts-canonical">,
  5754. HelpText<"Dump record layout information with canonical field types">,
  5755. MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsCanonical">>;
  5756. def fdump_record_layouts_complete : Flag<["-"], "fdump-record-layouts-complete">,
  5757. HelpText<"Dump record layout information for all complete types">,
  5758. MarshallingInfoFlag<LangOpts<"DumpRecordLayoutsComplete">>;
  5759. def fdump_record_layouts : Flag<["-"], "fdump-record-layouts">,
  5760. HelpText<"Dump record layout information">,
  5761. MarshallingInfoFlag<LangOpts<"DumpRecordLayouts">>,
  5762. ImpliedByAnyOf<[fdump_record_layouts_simple.KeyPath, fdump_record_layouts_complete.KeyPath, fdump_record_layouts_canonical.KeyPath]>;
  5763. def fix_what_you_can : Flag<["-"], "fix-what-you-can">,
  5764. HelpText<"Apply fix-it advice even in the presence of unfixable errors">,
  5765. MarshallingInfoFlag<FrontendOpts<"FixWhatYouCan">>;
  5766. def fix_only_warnings : Flag<["-"], "fix-only-warnings">,
  5767. HelpText<"Apply fix-it advice only for warnings, not errors">,
  5768. MarshallingInfoFlag<FrontendOpts<"FixOnlyWarnings">>;
  5769. def fixit_recompile : Flag<["-"], "fixit-recompile">,
  5770. HelpText<"Apply fix-it changes and recompile">,
  5771. MarshallingInfoFlag<FrontendOpts<"FixAndRecompile">>;
  5772. def fixit_to_temp : Flag<["-"], "fixit-to-temporary">,
  5773. HelpText<"Apply fix-it changes to temporary files">,
  5774. MarshallingInfoFlag<FrontendOpts<"FixToTemporaries">>;
  5775. def foverride_record_layout_EQ : Joined<["-"], "foverride-record-layout=">,
  5776. HelpText<"Override record layouts with those in the given file">,
  5777. MarshallingInfoString<FrontendOpts<"OverrideRecordLayoutsFile">>;
  5778. def pch_through_header_EQ : Joined<["-"], "pch-through-header=">,
  5779. HelpText<"Stop PCH generation after including this file. When using a PCH, "
  5780. "skip tokens until after this file is included.">,
  5781. MarshallingInfoString<PreprocessorOpts<"PCHThroughHeader">>;
  5782. def pch_through_hdrstop_create : Flag<["-"], "pch-through-hdrstop-create">,
  5783. HelpText<"When creating a PCH, stop PCH generation after #pragma hdrstop.">,
  5784. MarshallingInfoFlag<PreprocessorOpts<"PCHWithHdrStopCreate">>;
  5785. def pch_through_hdrstop_use : Flag<["-"], "pch-through-hdrstop-use">,
  5786. HelpText<"When using a PCH, skip tokens until after a #pragma hdrstop.">;
  5787. def fno_pch_timestamp : Flag<["-"], "fno-pch-timestamp">,
  5788. HelpText<"Disable inclusion of timestamp in precompiled headers">,
  5789. MarshallingInfoNegativeFlag<FrontendOpts<"IncludeTimestamps">>;
  5790. def building_pch_with_obj : Flag<["-"], "building-pch-with-obj">,
  5791. HelpText<"This compilation is part of building a PCH with corresponding object file.">,
  5792. MarshallingInfoFlag<LangOpts<"BuildingPCHWithObjectFile">>;
  5793. def aligned_alloc_unavailable : Flag<["-"], "faligned-alloc-unavailable">,
  5794. HelpText<"Aligned allocation/deallocation functions are unavailable">,
  5795. MarshallingInfoFlag<LangOpts<"AlignedAllocationUnavailable">>,
  5796. ShouldParseIf<faligned_allocation.KeyPath>;
  5797. } // let Flags = [CC1Option, NoDriverOption]
  5798. //===----------------------------------------------------------------------===//
  5799. // Language Options
  5800. //===----------------------------------------------------------------------===//
  5801. def version : Flag<["-"], "version">,
  5802. HelpText<"Print the compiler version">,
  5803. Flags<[CC1Option, CC1AsOption, FC1Option, NoDriverOption]>,
  5804. MarshallingInfoFlag<FrontendOpts<"ShowVersion">>;
  5805. def main_file_name : Separate<["-"], "main-file-name">,
  5806. HelpText<"Main file name to use for debug info and source if missing">,
  5807. Flags<[CC1Option, CC1AsOption, NoDriverOption]>,
  5808. MarshallingInfoString<CodeGenOpts<"MainFileName">>;
  5809. def split_dwarf_output : Separate<["-"], "split-dwarf-output">,
  5810. HelpText<"File name to use for split dwarf debug info output">,
  5811. Flags<[CC1Option, CC1AsOption, NoDriverOption]>,
  5812. MarshallingInfoString<CodeGenOpts<"SplitDwarfOutput">>;
  5813. let Flags = [CC1Option, FC1Option, NoDriverOption] in {
  5814. def mreassociate : Flag<["-"], "mreassociate">,
  5815. HelpText<"Allow reassociation transformations for floating-point instructions">,
  5816. MarshallingInfoFlag<LangOpts<"AllowFPReassoc">>, ImpliedByAnyOf<[funsafe_math_optimizations.KeyPath]>;
  5817. def menable_no_nans : Flag<["-"], "menable-no-nans">,
  5818. HelpText<"Allow optimization to assume there are no NaNs.">,
  5819. MarshallingInfoFlag<LangOpts<"NoHonorNaNs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>;
  5820. def menable_no_infinities : Flag<["-"], "menable-no-infs">,
  5821. HelpText<"Allow optimization to assume there are no infinities.">,
  5822. MarshallingInfoFlag<LangOpts<"NoHonorInfs">>, ImpliedByAnyOf<[ffinite_math_only.KeyPath]>;
  5823. def pic_level : Separate<["-"], "pic-level">,
  5824. HelpText<"Value for __PIC__">,
  5825. MarshallingInfoInt<LangOpts<"PICLevel">>;
  5826. def pic_is_pie : Flag<["-"], "pic-is-pie">,
  5827. HelpText<"File is for a position independent executable">,
  5828. MarshallingInfoFlag<LangOpts<"PIE">>;
  5829. } // let Flags = [CC1Option, FC1Option, NoDriverOption]
  5830. let Flags = [CC1Option, NoDriverOption] in {
  5831. def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
  5832. HelpText<"Weakly link in the blocks runtime">,
  5833. MarshallingInfoFlag<LangOpts<"BlocksRuntimeOptional">>;
  5834. def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
  5835. HelpText<"Assume all functions with C linkage do not unwind">,
  5836. MarshallingInfoFlag<LangOpts<"ExternCNoUnwind">>;
  5837. def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
  5838. HelpText<"Name of the split dwarf debug info file to encode in the object file">,
  5839. MarshallingInfoString<CodeGenOpts<"SplitDwarfFile">>;
  5840. def fno_wchar : Flag<["-"], "fno-wchar">,
  5841. HelpText<"Disable C++ builtin type wchar_t">,
  5842. MarshallingInfoNegativeFlag<LangOpts<"WChar">, cplusplus.KeyPath>,
  5843. ShouldParseIf<cplusplus.KeyPath>;
  5844. def fconstant_string_class : Separate<["-"], "fconstant-string-class">,
  5845. MetaVarName<"<class name>">,
  5846. HelpText<"Specify the class to use for constant Objective-C string objects.">,
  5847. MarshallingInfoString<LangOpts<"ObjCConstantStringClass">>;
  5848. def fobjc_arc_cxxlib_EQ : Joined<["-"], "fobjc-arc-cxxlib=">,
  5849. HelpText<"Objective-C++ Automatic Reference Counting standard library kind">,
  5850. Values<"libc++,libstdc++,none">,
  5851. NormalizedValues<["ARCXX_libcxx", "ARCXX_libstdcxx", "ARCXX_nolib"]>,
  5852. MarshallingInfoEnum<PreprocessorOpts<"ObjCXXARCStandardLibrary">, "ARCXX_nolib">;
  5853. def fobjc_runtime_has_weak : Flag<["-"], "fobjc-runtime-has-weak">,
  5854. HelpText<"The target Objective-C runtime supports ARC weak operations">;
  5855. def fobjc_dispatch_method_EQ : Joined<["-"], "fobjc-dispatch-method=">,
  5856. HelpText<"Objective-C dispatch method to use">,
  5857. Values<"legacy,non-legacy,mixed">,
  5858. NormalizedValuesScope<"CodeGenOptions">, NormalizedValues<["Legacy", "NonLegacy", "Mixed"]>,
  5859. MarshallingInfoEnum<CodeGenOpts<"ObjCDispatchMethod">, "Legacy">;
  5860. def disable_objc_default_synthesize_properties : Flag<["-"], "disable-objc-default-synthesize-properties">,
  5861. HelpText<"disable the default synthesis of Objective-C properties">,
  5862. MarshallingInfoNegativeFlag<LangOpts<"ObjCDefaultSynthProperties">>;
  5863. def fencode_extended_block_signature : Flag<["-"], "fencode-extended-block-signature">,
  5864. HelpText<"enable extended encoding of block type signature">,
  5865. MarshallingInfoFlag<LangOpts<"EncodeExtendedBlockSig">>;
  5866. def function_alignment : Separate<["-"], "function-alignment">,
  5867. HelpText<"default alignment for functions">,
  5868. MarshallingInfoInt<LangOpts<"FunctionAlignment">>;
  5869. def fhalf_no_semantic_interposition : Flag<["-"], "fhalf-no-semantic-interposition">,
  5870. HelpText<"Like -fno-semantic-interposition but don't use local aliases">,
  5871. MarshallingInfoFlag<LangOpts<"HalfNoSemanticInterposition">>;
  5872. def fno_validate_pch : Flag<["-"], "fno-validate-pch">,
  5873. HelpText<"Disable validation of precompiled headers">,
  5874. MarshallingInfoFlag<PreprocessorOpts<"DisablePCHOrModuleValidation">, "DisableValidationForModuleKind::None">,
  5875. Normalizer<"makeFlagToValueNormalizer(DisableValidationForModuleKind::All)">;
  5876. def fallow_pcm_with_errors : Flag<["-"], "fallow-pcm-with-compiler-errors">,
  5877. HelpText<"Accept a PCM file that was created with compiler errors">,
  5878. MarshallingInfoFlag<FrontendOpts<"AllowPCMWithCompilerErrors">>;
  5879. def fallow_pch_with_errors : Flag<["-"], "fallow-pch-with-compiler-errors">,
  5880. HelpText<"Accept a PCH file that was created with compiler errors">,
  5881. MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithCompilerErrors">>,
  5882. ImpliedByAnyOf<[fallow_pcm_with_errors.KeyPath]>;
  5883. def fallow_pch_with_different_modules_cache_path :
  5884. Flag<["-"], "fallow-pch-with-different-modules-cache-path">,
  5885. HelpText<"Accept a PCH file that was created with a different modules cache path">,
  5886. MarshallingInfoFlag<PreprocessorOpts<"AllowPCHWithDifferentModulesCachePath">>;
  5887. def fno_modules_share_filemanager : Flag<["-"], "fno-modules-share-filemanager">,
  5888. HelpText<"Disable sharing the FileManager when building a module implicitly">,
  5889. MarshallingInfoNegativeFlag<FrontendOpts<"ModulesShareFileManager">>;
  5890. def dump_deserialized_pch_decls : Flag<["-"], "dump-deserialized-decls">,
  5891. HelpText<"Dump declarations that are deserialized from PCH, for testing">,
  5892. MarshallingInfoFlag<PreprocessorOpts<"DumpDeserializedPCHDecls">>;
  5893. def error_on_deserialized_pch_decl : Separate<["-"], "error-on-deserialized-decl">,
  5894. HelpText<"Emit error if a specific declaration is deserialized from PCH, for testing">;
  5895. def error_on_deserialized_pch_decl_EQ : Joined<["-"], "error-on-deserialized-decl=">,
  5896. Alias<error_on_deserialized_pch_decl>;
  5897. def static_define : Flag<["-"], "static-define">,
  5898. HelpText<"Should __STATIC__ be defined">,
  5899. MarshallingInfoFlag<LangOpts<"Static">>;
  5900. def stack_protector : Separate<["-"], "stack-protector">,
  5901. HelpText<"Enable stack protectors">,
  5902. Values<"0,1,2,3">,
  5903. NormalizedValuesScope<"LangOptions">,
  5904. NormalizedValues<["SSPOff", "SSPOn", "SSPStrong", "SSPReq"]>,
  5905. MarshallingInfoEnum<LangOpts<"StackProtector">, "SSPOff">;
  5906. def stack_protector_buffer_size : Separate<["-"], "stack-protector-buffer-size">,
  5907. HelpText<"Lower bound for a buffer to be considered for stack protection">,
  5908. MarshallingInfoInt<CodeGenOpts<"SSPBufferSize">, "8">;
  5909. def ftype_visibility : Joined<["-"], "ftype-visibility=">,
  5910. HelpText<"Default type visibility">,
  5911. MarshallingInfoVisibility<LangOpts<"TypeVisibilityMode">, fvisibility_EQ.KeyPath>;
  5912. def fapply_global_visibility_to_externs : Flag<["-"], "fapply-global-visibility-to-externs">,
  5913. HelpText<"Apply global symbol visibility to external declarations without an explicit visibility">,
  5914. MarshallingInfoFlag<LangOpts<"SetVisibilityForExternDecls">>;
  5915. def ftemplate_depth : Separate<["-"], "ftemplate-depth">,
  5916. HelpText<"Maximum depth of recursive template instantiation">,
  5917. MarshallingInfoInt<LangOpts<"InstantiationDepth">, "1024">;
  5918. def foperator_arrow_depth : Separate<["-"], "foperator-arrow-depth">,
  5919. HelpText<"Maximum number of 'operator->'s to call for a member access">,
  5920. MarshallingInfoInt<LangOpts<"ArrowDepth">, "256">;
  5921. def fconstexpr_depth : Separate<["-"], "fconstexpr-depth">,
  5922. HelpText<"Maximum depth of recursive constexpr function calls">,
  5923. MarshallingInfoInt<LangOpts<"ConstexprCallDepth">, "512">;
  5924. def fconstexpr_steps : Separate<["-"], "fconstexpr-steps">,
  5925. HelpText<"Maximum number of steps in constexpr function evaluation">,
  5926. MarshallingInfoInt<LangOpts<"ConstexprStepLimit">, "1048576">;
  5927. def fbracket_depth : Separate<["-"], "fbracket-depth">,
  5928. HelpText<"Maximum nesting level for parentheses, brackets, and braces">,
  5929. MarshallingInfoInt<LangOpts<"BracketDepth">, "256">;
  5930. defm const_strings : BoolOption<"f", "const-strings",
  5931. LangOpts<"ConstStrings">, DefaultFalse,
  5932. PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
  5933. BothFlags<[], " a const qualified type for string literals in C and ObjC">>;
  5934. def fno_bitfield_type_align : Flag<["-"], "fno-bitfield-type-align">,
  5935. HelpText<"Ignore bit-field types when aligning structures">,
  5936. MarshallingInfoFlag<LangOpts<"NoBitFieldTypeAlign">>;
  5937. def ffake_address_space_map : Flag<["-"], "ffake-address-space-map">,
  5938. HelpText<"Use a fake address space map; OpenCL testing purposes only">,
  5939. MarshallingInfoFlag<LangOpts<"FakeAddressSpaceMap">>;
  5940. def faddress_space_map_mangling_EQ : Joined<["-"], "faddress-space-map-mangling=">,
  5941. HelpText<"Set the mode for address space map based mangling; OpenCL testing purposes only">,
  5942. Values<"target,no,yes">,
  5943. NormalizedValuesScope<"LangOptions">,
  5944. NormalizedValues<["ASMM_Target", "ASMM_Off", "ASMM_On"]>,
  5945. MarshallingInfoEnum<LangOpts<"AddressSpaceMapMangling">, "ASMM_Target">;
  5946. def funknown_anytype : Flag<["-"], "funknown-anytype">,
  5947. HelpText<"Enable parser support for the __unknown_anytype type; for testing purposes only">,
  5948. MarshallingInfoFlag<LangOpts<"ParseUnknownAnytype">>;
  5949. def fdebugger_support : Flag<["-"], "fdebugger-support">,
  5950. HelpText<"Enable special debugger support behavior">,
  5951. MarshallingInfoFlag<LangOpts<"DebuggerSupport">>;
  5952. def fdebugger_cast_result_to_id : Flag<["-"], "fdebugger-cast-result-to-id">,
  5953. HelpText<"Enable casting unknown expression results to id">,
  5954. MarshallingInfoFlag<LangOpts<"DebuggerCastResultToId">>;
  5955. def fdebugger_objc_literal : Flag<["-"], "fdebugger-objc-literal">,
  5956. HelpText<"Enable special debugger support for Objective-C subscripting and literals">,
  5957. MarshallingInfoFlag<LangOpts<"DebuggerObjCLiteral">>;
  5958. defm deprecated_macro : BoolOption<"f", "deprecated-macro",
  5959. LangOpts<"Deprecated">, DefaultFalse,
  5960. PosFlag<SetTrue, [], "Defines">, NegFlag<SetFalse, [], "Undefines">,
  5961. BothFlags<[], " the __DEPRECATED macro">>;
  5962. def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-runtime">,
  5963. HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
  5964. // TODO: Enforce values valid for MSVtorDispMode.
  5965. def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
  5966. HelpText<"Control vtordisp placement on win32 targets">,
  5967. MarshallingInfoInt<LangOpts<"VtorDispMode">, "1">;
  5968. def fnative_half_type: Flag<["-"], "fnative-half-type">,
  5969. HelpText<"Use the native half type for __fp16 instead of promoting to float">,
  5970. MarshallingInfoFlag<LangOpts<"NativeHalfType">>,
  5971. ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath]>;
  5972. def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
  5973. HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">,
  5974. MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>,
  5975. ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath]>;
  5976. def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
  5977. HelpText<"Set default calling convention">,
  5978. Values<"cdecl,fastcall,stdcall,vectorcall,regcall">,
  5979. NormalizedValuesScope<"LangOptions">,
  5980. NormalizedValues<["DCC_CDecl", "DCC_FastCall", "DCC_StdCall", "DCC_VectorCall", "DCC_RegCall"]>,
  5981. MarshallingInfoEnum<LangOpts<"DefaultCallingConv">, "DCC_None">;
  5982. // These options cannot be marshalled, because they are used to set up the LangOptions defaults.
  5983. def finclude_default_header : Flag<["-"], "finclude-default-header">,
  5984. HelpText<"Include default header file for OpenCL and HLSL">;
  5985. def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">,
  5986. HelpText<"Add OpenCL builtin function declarations (experimental)">;
  5987. def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">,
  5988. HelpText<"Preserve 3-component vector type">,
  5989. MarshallingInfoFlag<CodeGenOpts<"PreserveVec3Type">>,
  5990. ImpliedByAnyOf<[hlsl.KeyPath]>;
  5991. def fwchar_type_EQ : Joined<["-"], "fwchar-type=">,
  5992. HelpText<"Select underlying type for wchar_t">,
  5993. Values<"char,short,int">,
  5994. NormalizedValues<["1", "2", "4"]>,
  5995. MarshallingInfoEnum<LangOpts<"WCharSize">, "0">;
  5996. defm signed_wchar : BoolOption<"f", "signed-wchar",
  5997. LangOpts<"WCharIsSigned">, DefaultTrue,
  5998. NegFlag<SetFalse, [CC1Option], "Use an unsigned">, PosFlag<SetTrue, [], "Use a signed">,
  5999. BothFlags<[], " type for wchar_t">>;
  6000. def fcompatibility_qualified_id_block_param_type_checking : Flag<["-"], "fcompatibility-qualified-id-block-type-checking">,
  6001. HelpText<"Allow using blocks with parameters of more specific type than "
  6002. "the type system guarantees when a parameter is qualified id">,
  6003. MarshallingInfoFlag<LangOpts<"CompatibilityQualifiedIdBlockParamTypeChecking">>;
  6004. def fpass_by_value_is_noalias: Flag<["-"], "fpass-by-value-is-noalias">,
  6005. HelpText<"Allows assuming by-value parameters do not alias any other value. "
  6006. "Has no effect on non-trivially-copyable classes in C++.">, Group<f_Group>,
  6007. MarshallingInfoFlag<CodeGenOpts<"PassByValueIsNoAlias">>;
  6008. // FIXME: Remove these entirely once functionality/tests have been excised.
  6009. def fobjc_gc_only : Flag<["-"], "fobjc-gc-only">, Group<f_Group>,
  6010. HelpText<"Use GC exclusively for Objective-C related memory management">;
  6011. def fobjc_gc : Flag<["-"], "fobjc-gc">, Group<f_Group>,
  6012. HelpText<"Enable Objective-C garbage collection">;
  6013. def fexperimental_max_bitint_width_EQ:
  6014. Joined<["-"], "fexperimental-max-bitint-width=">, Group<f_Group>,
  6015. MetaVarName<"<N>">,
  6016. HelpText<"Set the maximum bitwidth for _BitInt (this option is expected to be removed in the future)">,
  6017. MarshallingInfoInt<LangOpts<"MaxBitIntWidth">>;
  6018. } // let Flags = [CC1Option, NoDriverOption]
  6019. //===----------------------------------------------------------------------===//
  6020. // Header Search Options
  6021. //===----------------------------------------------------------------------===//
  6022. let Flags = [CC1Option, NoDriverOption] in {
  6023. def nostdsysteminc : Flag<["-"], "nostdsysteminc">,
  6024. HelpText<"Disable standard system #include directories">,
  6025. MarshallingInfoNegativeFlag<HeaderSearchOpts<"UseStandardSystemIncludes">>;
  6026. def fdisable_module_hash : Flag<["-"], "fdisable-module-hash">,
  6027. HelpText<"Disable the module hash">,
  6028. MarshallingInfoFlag<HeaderSearchOpts<"DisableModuleHash">>;
  6029. def fmodules_hash_content : Flag<["-"], "fmodules-hash-content">,
  6030. HelpText<"Enable hashing the content of a module file">,
  6031. MarshallingInfoFlag<HeaderSearchOpts<"ModulesHashContent">>;
  6032. def fmodules_strict_context_hash : Flag<["-"], "fmodules-strict-context-hash">,
  6033. HelpText<"Enable hashing of all compiler options that could impact the "
  6034. "semantics of a module in an implicit build">,
  6035. MarshallingInfoFlag<HeaderSearchOpts<"ModulesStrictContextHash">>;
  6036. def c_isystem : Separate<["-"], "c-isystem">, MetaVarName<"<directory>">,
  6037. HelpText<"Add directory to the C SYSTEM include search path">;
  6038. def objc_isystem : Separate<["-"], "objc-isystem">,
  6039. MetaVarName<"<directory>">,
  6040. HelpText<"Add directory to the ObjC SYSTEM include search path">;
  6041. def objcxx_isystem : Separate<["-"], "objcxx-isystem">,
  6042. MetaVarName<"<directory>">,
  6043. HelpText<"Add directory to the ObjC++ SYSTEM include search path">;
  6044. def internal_isystem : Separate<["-"], "internal-isystem">,
  6045. MetaVarName<"<directory>">,
  6046. HelpText<"Add directory to the internal system include search path; these "
  6047. "are assumed to not be user-provided and are used to model system "
  6048. "and standard headers' paths.">;
  6049. def internal_externc_isystem : Separate<["-"], "internal-externc-isystem">,
  6050. MetaVarName<"<directory>">,
  6051. HelpText<"Add directory to the internal system include search path with "
  6052. "implicit extern \"C\" semantics; these are assumed to not be "
  6053. "user-provided and are used to model system and standard headers' "
  6054. "paths.">;
  6055. } // let Flags = [CC1Option, NoDriverOption]
  6056. //===----------------------------------------------------------------------===//
  6057. // Preprocessor Options
  6058. //===----------------------------------------------------------------------===//
  6059. let Flags = [CC1Option, NoDriverOption] in {
  6060. def chain_include : Separate<["-"], "chain-include">, MetaVarName<"<file>">,
  6061. HelpText<"Include and chain a header file after turning it into PCH">;
  6062. def preamble_bytes_EQ : Joined<["-"], "preamble-bytes=">,
  6063. HelpText<"Assume that the precompiled header is a precompiled preamble "
  6064. "covering the first N bytes of the main file">;
  6065. def detailed_preprocessing_record : Flag<["-"], "detailed-preprocessing-record">,
  6066. HelpText<"include a detailed record of preprocessing actions">,
  6067. MarshallingInfoFlag<PreprocessorOpts<"DetailedRecord">>;
  6068. def setup_static_analyzer : Flag<["-"], "setup-static-analyzer">,
  6069. HelpText<"Set up preprocessor for static analyzer (done automatically when static analyzer is run).">,
  6070. MarshallingInfoFlag<PreprocessorOpts<"SetUpStaticAnalyzer">>;
  6071. def disable_pragma_debug_crash : Flag<["-"], "disable-pragma-debug-crash">,
  6072. HelpText<"Disable any #pragma clang __debug that can lead to crashing behavior. This is meant for testing.">,
  6073. MarshallingInfoFlag<PreprocessorOpts<"DisablePragmaDebugCrash">>;
  6074. def source_date_epoch : Separate<["-"], "source-date-epoch">,
  6075. MetaVarName<"<time since Epoch in seconds>">,
  6076. HelpText<"Time to be used in __DATE__, __TIME__, and __TIMESTAMP__ macros">;
  6077. } // let Flags = [CC1Option, NoDriverOption]
  6078. //===----------------------------------------------------------------------===//
  6079. // CUDA Options
  6080. //===----------------------------------------------------------------------===//
  6081. let Flags = [CC1Option, NoDriverOption] in {
  6082. def fcuda_is_device : Flag<["-"], "fcuda-is-device">,
  6083. HelpText<"Generate code for CUDA device">,
  6084. MarshallingInfoFlag<LangOpts<"CUDAIsDevice">>;
  6085. def fcuda_include_gpubinary : Separate<["-"], "fcuda-include-gpubinary">,
  6086. HelpText<"Incorporate CUDA device-side binary into host object file.">,
  6087. MarshallingInfoString<CodeGenOpts<"CudaGpuBinaryFileName">>;
  6088. def fcuda_allow_variadic_functions : Flag<["-"], "fcuda-allow-variadic-functions">,
  6089. HelpText<"Allow variadic functions in CUDA device code.">,
  6090. MarshallingInfoFlag<LangOpts<"CUDAAllowVariadicFunctions">>;
  6091. def fno_cuda_host_device_constexpr : Flag<["-"], "fno-cuda-host-device-constexpr">,
  6092. HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">,
  6093. MarshallingInfoNegativeFlag<LangOpts<"CUDAHostDeviceConstexpr">>;
  6094. } // let Flags = [CC1Option, NoDriverOption]
  6095. //===----------------------------------------------------------------------===//
  6096. // OpenMP Options
  6097. //===----------------------------------------------------------------------===//
  6098. def fopenmp_is_device : Flag<["-"], "fopenmp-is-device">,
  6099. HelpText<"Generate code only for an OpenMP target device.">,
  6100. Flags<[CC1Option, NoDriverOption]>;
  6101. def fopenmp_host_ir_file_path : Separate<["-"], "fopenmp-host-ir-file-path">,
  6102. HelpText<"Path to the IR file produced by the frontend for the host.">,
  6103. Flags<[CC1Option, NoDriverOption]>;
  6104. //===----------------------------------------------------------------------===//
  6105. // SYCL Options
  6106. //===----------------------------------------------------------------------===//
  6107. def fsycl_is_device : Flag<["-"], "fsycl-is-device">,
  6108. HelpText<"Generate code for SYCL device.">,
  6109. Flags<[CC1Option, NoDriverOption]>,
  6110. MarshallingInfoFlag<LangOpts<"SYCLIsDevice">>;
  6111. def fsycl_is_host : Flag<["-"], "fsycl-is-host">,
  6112. HelpText<"SYCL host compilation">,
  6113. Flags<[CC1Option, NoDriverOption]>,
  6114. MarshallingInfoFlag<LangOpts<"SYCLIsHost">>;
  6115. def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>,
  6116. Flags<[CC1Option, NoArgumentUnused, CoreOption]>,
  6117. HelpText<"SYCL language standard to compile for.">,
  6118. Values<"2020,2017,121,1.2.1,sycl-1.2.1">,
  6119. NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>,
  6120. NormalizedValuesScope<"LangOptions">,
  6121. MarshallingInfoEnum<LangOpts<"SYCLVersion">, "SYCL_None">,
  6122. ShouldParseIf<!strconcat(fsycl_is_device.KeyPath, "||", fsycl_is_host.KeyPath)>;
  6123. defm cuda_approx_transcendentals : BoolFOption<"cuda-approx-transcendentals",
  6124. LangOpts<"CUDADeviceApproxTranscendentals">, DefaultFalse,
  6125. PosFlag<SetTrue, [CC1Option], "Use">, NegFlag<SetFalse, [], "Don't use">,
  6126. BothFlags<[], " approximate transcendental functions">>,
  6127. ShouldParseIf<fcuda_is_device.KeyPath>;
  6128. //===----------------------------------------------------------------------===//
  6129. // Frontend Options - cc1 + fc1
  6130. //===----------------------------------------------------------------------===//
  6131. let Flags = [CC1Option, FC1Option, NoDriverOption] in {
  6132. let Group = Action_Group in {
  6133. def emit_obj : Flag<["-"], "emit-obj">,
  6134. HelpText<"Emit native object files">;
  6135. def init_only : Flag<["-"], "init-only">,
  6136. HelpText<"Only execute frontend initialization">;
  6137. def emit_llvm_bc : Flag<["-"], "emit-llvm-bc">,
  6138. HelpText<"Build ASTs then convert to LLVM, emit .bc file">;
  6139. } // let Group = Action_Group
  6140. def load : Separate<["-"], "load">, MetaVarName<"<dsopath>">,
  6141. HelpText<"Load the named plugin (dynamic shared object)">;
  6142. def plugin : Separate<["-"], "plugin">, MetaVarName<"<name>">,
  6143. HelpText<"Use the named plugin action instead of the default action (use \"help\" to list available options)">;
  6144. defm debug_pass_manager : BoolOption<"f", "debug-pass-manager",
  6145. CodeGenOpts<"DebugPassManager">, DefaultFalse,
  6146. PosFlag<SetTrue, [], "Prints debug information for the new pass manager">,
  6147. NegFlag<SetFalse, [], "Disables debug printing for the new pass manager">>;
  6148. } // let Flags = [CC1Option, FC1Option, NoDriverOption]
  6149. //===----------------------------------------------------------------------===//
  6150. // cc1as-only Options
  6151. //===----------------------------------------------------------------------===//
  6152. let Flags = [CC1AsOption, NoDriverOption] in {
  6153. // Language Options
  6154. def n : Flag<["-"], "n">,
  6155. HelpText<"Don't automatically start assembly file with a text section">;
  6156. // Frontend Options
  6157. def filetype : Separate<["-"], "filetype">,
  6158. HelpText<"Specify the output file type ('asm', 'null', or 'obj')">;
  6159. // Transliterate Options
  6160. def output_asm_variant : Separate<["-"], "output-asm-variant">,
  6161. HelpText<"Select the asm variant index to use for output">;
  6162. def show_encoding : Flag<["-"], "show-encoding">,
  6163. HelpText<"Show instruction encoding information in transliterate mode">;
  6164. def show_inst : Flag<["-"], "show-inst">,
  6165. HelpText<"Show internal instruction representation in transliterate mode">;
  6166. // Assemble Options
  6167. def dwarf_debug_producer : Separate<["-"], "dwarf-debug-producer">,
  6168. HelpText<"The string to embed in the Dwarf debug AT_producer record.">;
  6169. def defsym : Separate<["-"], "defsym">,
  6170. HelpText<"Define a value for a symbol">;
  6171. } // let Flags = [CC1AsOption]
  6172. //===----------------------------------------------------------------------===//
  6173. // clang-cl Options
  6174. //===----------------------------------------------------------------------===//
  6175. def cl_Group : OptionGroup<"<clang-cl options>">, Flags<[CLDXCOption]>,
  6176. HelpText<"CL.EXE COMPATIBILITY OPTIONS">;
  6177. def cl_compile_Group : OptionGroup<"<clang-cl compile-only options>">,
  6178. Group<cl_Group>;
  6179. def cl_ignored_Group : OptionGroup<"<clang-cl ignored options>">,
  6180. Group<cl_Group>;
  6181. class CLFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
  6182. Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
  6183. class CLDXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
  6184. Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>;
  6185. class CLCompileFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
  6186. Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>;
  6187. class CLIgnoredFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
  6188. Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption]>;
  6189. class CLJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
  6190. Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
  6191. class CLDXCJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
  6192. Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>;
  6193. class CLCompileJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
  6194. Group<cl_compile_Group>, Flags<[CLOption, NoXarchOption]>;
  6195. class CLIgnoredJoined<string name> : Option<["/", "-"], name, KIND_JOINED>,
  6196. Group<cl_ignored_Group>, Flags<[CLOption, NoXarchOption, HelpHidden]>;
  6197. class CLJoinedOrSeparate<string name> : Option<["/", "-"], name,
  6198. KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
  6199. class CLDXCJoinedOrSeparate<string name> : Option<["/", "-"], name,
  6200. KIND_JOINED_OR_SEPARATE>, Group<cl_Group>, Flags<[CLDXCOption, NoXarchOption]>;
  6201. class CLCompileJoinedOrSeparate<string name> : Option<["/", "-"], name,
  6202. KIND_JOINED_OR_SEPARATE>, Group<cl_compile_Group>,
  6203. Flags<[CLOption, NoXarchOption]>;
  6204. class CLRemainingArgsJoined<string name> : Option<["/", "-"], name,
  6205. KIND_REMAINING_ARGS_JOINED>, Group<cl_Group>, Flags<[CLOption, NoXarchOption]>;
  6206. // Aliases:
  6207. // (We don't put any of these in cl_compile_Group as the options they alias are
  6208. // already in the right group.)
  6209. def _SLASH_Brepro : CLFlag<"Brepro">,
  6210. HelpText<"Do not write current time into COFF output (breaks link.exe /incremental)">,
  6211. Alias<mno_incremental_linker_compatible>;
  6212. def _SLASH_Brepro_ : CLFlag<"Brepro-">,
  6213. HelpText<"Write current time into COFF output (default)">,
  6214. Alias<mincremental_linker_compatible>;
  6215. def _SLASH_C : CLFlag<"C">,
  6216. HelpText<"Do not discard comments when preprocessing">, Alias<C>;
  6217. def _SLASH_c : CLFlag<"c">, HelpText<"Compile only">, Alias<c>;
  6218. def _SLASH_d1PP : CLFlag<"d1PP">,
  6219. HelpText<"Retain macro definitions in /E mode">, Alias<dD>;
  6220. def _SLASH_d1reportAllClassLayout : CLFlag<"d1reportAllClassLayout">,
  6221. HelpText<"Dump record layout information">,
  6222. Alias<Xclang>, AliasArgs<["-fdump-record-layouts"]>;
  6223. def _SLASH_diagnostics_caret : CLFlag<"diagnostics:caret">,
  6224. HelpText<"Enable caret and column diagnostics (default)">;
  6225. def _SLASH_diagnostics_column : CLFlag<"diagnostics:column">,
  6226. HelpText<"Disable caret diagnostics but keep column info">;
  6227. def _SLASH_diagnostics_classic : CLFlag<"diagnostics:classic">,
  6228. HelpText<"Disable column and caret diagnostics">;
  6229. def _SLASH_D : CLJoinedOrSeparate<"D">, HelpText<"Define macro">,
  6230. MetaVarName<"<macro[=value]>">, Alias<D>;
  6231. def _SLASH_E : CLFlag<"E">, HelpText<"Preprocess to stdout">, Alias<E>;
  6232. def _SLASH_external_COLON_I : CLJoinedOrSeparate<"external:I">, Alias<isystem>,
  6233. HelpText<"Add directory to include search path with warnings suppressed">,
  6234. MetaVarName<"<dir>">;
  6235. def _SLASH_fp_contract : CLFlag<"fp:contract">, HelpText<"">, Alias<ffp_contract>, AliasArgs<["on"]>;
  6236. def _SLASH_fp_except : CLFlag<"fp:except">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["strict"]>;
  6237. def _SLASH_fp_except_ : CLFlag<"fp:except-">, HelpText<"">, Alias<ffp_exception_behavior_EQ>, AliasArgs<["ignore"]>;
  6238. def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>;
  6239. def _SLASH_fp_precise : CLFlag<"fp:precise">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["precise"]>;
  6240. def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<ffp_model_EQ>, AliasArgs<["strict"]>;
  6241. def _SLASH_fsanitize_EQ_address : CLFlag<"fsanitize=address">,
  6242. HelpText<"Enable AddressSanitizer">,
  6243. Alias<fsanitize_EQ>, AliasArgs<["address"]>;
  6244. def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>,
  6245. HelpText<"Assume thread-local variables are defined in the executable">;
  6246. def _SLASH_GR : CLFlag<"GR">, HelpText<"Emit RTTI data (default)">;
  6247. def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Do not emit RTTI data">;
  6248. def _SLASH_GF : CLIgnoredFlag<"GF">,
  6249. HelpText<"Enable string pooling (default)">;
  6250. def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">,
  6251. Alias<fwritable_strings>;
  6252. def _SLASH_GS : CLFlag<"GS">,
  6253. HelpText<"Enable buffer security check (default)">;
  6254. def _SLASH_GS_ : CLFlag<"GS-">, HelpText<"Disable buffer security check">;
  6255. def : CLFlag<"Gs">, HelpText<"Use stack probes (default)">,
  6256. Alias<mstack_probe_size>, AliasArgs<["4096"]>;
  6257. def _SLASH_Gs : CLJoined<"Gs">,
  6258. HelpText<"Set stack probe size (default 4096)">, Alias<mstack_probe_size>;
  6259. def _SLASH_Gy : CLFlag<"Gy">, HelpText<"Put each function in its own section">,
  6260. Alias<ffunction_sections>;
  6261. def _SLASH_Gy_ : CLFlag<"Gy-">,
  6262. HelpText<"Do not put each function in its own section (default)">,
  6263. Alias<fno_function_sections>;
  6264. def _SLASH_Gw : CLFlag<"Gw">, HelpText<"Put each data item in its own section">,
  6265. Alias<fdata_sections>;
  6266. def _SLASH_Gw_ : CLFlag<"Gw-">,
  6267. HelpText<"Do not put each data item in its own section (default)">,
  6268. Alias<fno_data_sections>;
  6269. def _SLASH_help : CLFlag<"help">, Alias<help>,
  6270. HelpText<"Display available options">;
  6271. def _SLASH_HELP : CLFlag<"HELP">, Alias<help>;
  6272. def _SLASH_hotpatch : CLFlag<"hotpatch">, Alias<fms_hotpatch>,
  6273. HelpText<"Create hotpatchable image">;
  6274. def _SLASH_I : CLDXCJoinedOrSeparate<"I">,
  6275. HelpText<"Add directory to include search path">, MetaVarName<"<dir>">,
  6276. Alias<I>;
  6277. def _SLASH_J : CLFlag<"J">, HelpText<"Make char type unsigned">,
  6278. Alias<funsigned_char>;
  6279. // The _SLASH_O option handles all the /O flags, but we also provide separate
  6280. // aliased options to provide separate help messages.
  6281. def _SLASH_O : CLDXCJoined<"O">,
  6282. HelpText<"Set multiple /O flags at once; e.g. '/O2y-' for '/O2 /Oy-'">,
  6283. MetaVarName<"<flags>">;
  6284. def : CLFlag<"O1">, Alias<_SLASH_O>, AliasArgs<["1"]>,
  6285. HelpText<"Optimize for size (like /Og /Os /Oy /Ob2 /GF /Gy)">;
  6286. def : CLFlag<"O2">, Alias<_SLASH_O>, AliasArgs<["2"]>,
  6287. HelpText<"Optimize for speed (like /Og /Oi /Ot /Oy /Ob2 /GF /Gy)">;
  6288. def : CLFlag<"Ob0">, Alias<_SLASH_O>, AliasArgs<["b0"]>,
  6289. HelpText<"Disable function inlining">;
  6290. def : CLFlag<"Ob1">, Alias<_SLASH_O>, AliasArgs<["b1"]>,
  6291. HelpText<"Only inline functions explicitly or implicitly marked inline">;
  6292. def : CLFlag<"Ob2">, Alias<_SLASH_O>, AliasArgs<["b2"]>,
  6293. HelpText<"Inline functions as deemed beneficial by the compiler">;
  6294. def : CLDXCFlag<"Od">, Alias<_SLASH_O>, AliasArgs<["d"]>,
  6295. HelpText<"Disable optimization">;
  6296. def : CLFlag<"Og">, Alias<_SLASH_O>, AliasArgs<["g"]>,
  6297. HelpText<"No effect">;
  6298. def : CLFlag<"Oi">, Alias<_SLASH_O>, AliasArgs<["i"]>,
  6299. HelpText<"Enable use of builtin functions">;
  6300. def : CLFlag<"Oi-">, Alias<_SLASH_O>, AliasArgs<["i-"]>,
  6301. HelpText<"Disable use of builtin functions">;
  6302. def : CLFlag<"Os">, Alias<_SLASH_O>, AliasArgs<["s"]>,
  6303. HelpText<"Optimize for size">;
  6304. def : CLFlag<"Ot">, Alias<_SLASH_O>, AliasArgs<["t"]>,
  6305. HelpText<"Optimize for speed">;
  6306. def : CLFlag<"Ox">, Alias<_SLASH_O>, AliasArgs<["x"]>,
  6307. HelpText<"Deprecated (like /Og /Oi /Ot /Oy /Ob2); use /O2">;
  6308. def : CLFlag<"Oy">, Alias<_SLASH_O>, AliasArgs<["y"]>,
  6309. HelpText<"Enable frame pointer omission (x86 only)">;
  6310. def : CLFlag<"Oy-">, Alias<_SLASH_O>, AliasArgs<["y-"]>,
  6311. HelpText<"Disable frame pointer omission (x86 only, default)">;
  6312. def _SLASH_QUESTION : CLFlag<"?">, Alias<help>,
  6313. HelpText<"Display available options">;
  6314. def _SLASH_Qvec : CLFlag<"Qvec">,
  6315. HelpText<"Enable the loop vectorization passes">, Alias<fvectorize>;
  6316. def _SLASH_Qvec_ : CLFlag<"Qvec-">,
  6317. HelpText<"Disable the loop vectorization passes">, Alias<fno_vectorize>;
  6318. def _SLASH_showIncludes : CLFlag<"showIncludes">,
  6319. HelpText<"Print info about included files to stderr">;
  6320. def _SLASH_showIncludes_user : CLFlag<"showIncludes:user">,
  6321. HelpText<"Like /showIncludes but omit system headers">;
  6322. def _SLASH_showFilenames : CLFlag<"showFilenames">,
  6323. HelpText<"Print the name of each compiled file">;
  6324. def _SLASH_showFilenames_ : CLFlag<"showFilenames-">,
  6325. HelpText<"Do not print the name of each compiled file (default)">;
  6326. def _SLASH_source_charset : CLCompileJoined<"source-charset:">,
  6327. HelpText<"Set source encoding, supports only UTF-8">,
  6328. Alias<finput_charset_EQ>;
  6329. def _SLASH_execution_charset : CLCompileJoined<"execution-charset:">,
  6330. HelpText<"Set runtime encoding, supports only UTF-8">,
  6331. Alias<fexec_charset_EQ>;
  6332. def _SLASH_std : CLCompileJoined<"std:">,
  6333. HelpText<"Set language version (c++14,c++17,c++20,c++latest,c11,c17)">;
  6334. def _SLASH_U : CLJoinedOrSeparate<"U">, HelpText<"Undefine macro">,
  6335. MetaVarName<"<macro>">, Alias<U>;
  6336. def _SLASH_validate_charset : CLFlag<"validate-charset">,
  6337. Alias<W_Joined>, AliasArgs<["invalid-source-encoding"]>;
  6338. def _SLASH_validate_charset_ : CLFlag<"validate-charset-">,
  6339. Alias<W_Joined>, AliasArgs<["no-invalid-source-encoding"]>;
  6340. def _SLASH_external_W0 : CLFlag<"external:W0">, HelpText<"Ignore warnings from system headers (default)">, Alias<Wno_system_headers>;
  6341. def _SLASH_external_W1 : CLFlag<"external:W1">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
  6342. def _SLASH_external_W2 : CLFlag<"external:W2">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
  6343. def _SLASH_external_W3 : CLFlag<"external:W3">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
  6344. def _SLASH_external_W4 : CLFlag<"external:W4">, HelpText<"Enable -Wsystem-headers">, Alias<Wsystem_headers>;
  6345. def _SLASH_W0 : CLFlag<"W0">, HelpText<"Disable all warnings">, Alias<w>;
  6346. def _SLASH_W1 : CLFlag<"W1">, HelpText<"Enable -Wall">, Alias<Wall>;
  6347. def _SLASH_W2 : CLFlag<"W2">, HelpText<"Enable -Wall">, Alias<Wall>;
  6348. def _SLASH_W3 : CLFlag<"W3">, HelpText<"Enable -Wall">, Alias<Wall>;
  6349. def _SLASH_W4 : CLFlag<"W4">, HelpText<"Enable -Wall and -Wextra">, Alias<WCL4>;
  6350. def _SLASH_Wall : CLFlag<"Wall">, HelpText<"Enable -Weverything">,
  6351. Alias<W_Joined>, AliasArgs<["everything"]>;
  6352. def _SLASH_WX : CLFlag<"WX">, HelpText<"Treat warnings as errors">,
  6353. Alias<W_Joined>, AliasArgs<["error"]>;
  6354. def _SLASH_WX_ : CLFlag<"WX-">,
  6355. HelpText<"Do not treat warnings as errors (default)">,
  6356. Alias<W_Joined>, AliasArgs<["no-error"]>;
  6357. def _SLASH_w_flag : CLFlag<"w">, HelpText<"Disable all warnings">, Alias<w>;
  6358. def _SLASH_wd : CLCompileJoined<"wd">;
  6359. def _SLASH_vd : CLJoined<"vd">, HelpText<"Control vtordisp placement">,
  6360. Alias<vtordisp_mode_EQ>;
  6361. def _SLASH_X : CLFlag<"X">,
  6362. HelpText<"Do not add %INCLUDE% to include search path">, Alias<nostdlibinc>;
  6363. def _SLASH_Zc_sizedDealloc : CLFlag<"Zc:sizedDealloc">,
  6364. HelpText<"Enable C++14 sized global deallocation functions">,
  6365. Alias<fsized_deallocation>;
  6366. def _SLASH_Zc_sizedDealloc_ : CLFlag<"Zc:sizedDealloc-">,
  6367. HelpText<"Disable C++14 sized global deallocation functions">,
  6368. Alias<fno_sized_deallocation>;
  6369. def _SLASH_Zc_alignedNew : CLFlag<"Zc:alignedNew">,
  6370. HelpText<"Enable C++17 aligned allocation functions">,
  6371. Alias<faligned_allocation>;
  6372. def _SLASH_Zc_alignedNew_ : CLFlag<"Zc:alignedNew-">,
  6373. HelpText<"Disable C++17 aligned allocation functions">,
  6374. Alias<fno_aligned_allocation>;
  6375. def _SLASH_Zc_char8_t : CLFlag<"Zc:char8_t">,
  6376. HelpText<"Enable char8_t from C++2a">,
  6377. Alias<fchar8__t>;
  6378. def _SLASH_Zc_char8_t_ : CLFlag<"Zc:char8_t-">,
  6379. HelpText<"Disable char8_t from c++2a">,
  6380. Alias<fno_char8__t>;
  6381. def _SLASH_Zc_strictStrings : CLFlag<"Zc:strictStrings">,
  6382. HelpText<"Treat string literals as const">, Alias<W_Joined>,
  6383. AliasArgs<["error=c++11-compat-deprecated-writable-strings"]>;
  6384. def _SLASH_Zc_threadSafeInit : CLFlag<"Zc:threadSafeInit">,
  6385. HelpText<"Enable thread-safe initialization of static variables">,
  6386. Alias<fthreadsafe_statics>;
  6387. def _SLASH_Zc_threadSafeInit_ : CLFlag<"Zc:threadSafeInit-">,
  6388. HelpText<"Disable thread-safe initialization of static variables">,
  6389. Alias<fno_threadsafe_statics>;
  6390. def _SLASH_Zc_trigraphs : CLFlag<"Zc:trigraphs">,
  6391. HelpText<"Enable trigraphs">, Alias<ftrigraphs>;
  6392. def _SLASH_Zc_trigraphs_off : CLFlag<"Zc:trigraphs-">,
  6393. HelpText<"Disable trigraphs (default)">, Alias<fno_trigraphs>;
  6394. def _SLASH_Zc_twoPhase : CLFlag<"Zc:twoPhase">,
  6395. HelpText<"Enable two-phase name lookup in templates">,
  6396. Alias<fno_delayed_template_parsing>;
  6397. def _SLASH_Zc_twoPhase_ : CLFlag<"Zc:twoPhase-">,
  6398. HelpText<"Disable two-phase name lookup in templates (default)">,
  6399. Alias<fdelayed_template_parsing>;
  6400. def _SLASH_Zc_wchar_t : CLFlag<"Zc:wchar_t">,
  6401. HelpText<"Enable C++ builtin type wchar_t (default)">;
  6402. def _SLASH_Zc_wchar_t_ : CLFlag<"Zc:wchar_t-">,
  6403. HelpText<"Disable C++ builtin type wchar_t">;
  6404. def _SLASH_Z7 : CLFlag<"Z7">,
  6405. HelpText<"Enable CodeView debug information in object files">;
  6406. def _SLASH_ZH_MD5 : CLFlag<"ZH:MD5">,
  6407. HelpText<"Use MD5 for file checksums in debug info (default)">,
  6408. Alias<gsrc_hash_EQ>, AliasArgs<["md5"]>;
  6409. def _SLASH_ZH_SHA1 : CLFlag<"ZH:SHA1">,
  6410. HelpText<"Use SHA1 for file checksums in debug info">,
  6411. Alias<gsrc_hash_EQ>, AliasArgs<["sha1"]>;
  6412. def _SLASH_ZH_SHA_256 : CLFlag<"ZH:SHA_256">,
  6413. HelpText<"Use SHA256 for file checksums in debug info">,
  6414. Alias<gsrc_hash_EQ>, AliasArgs<["sha256"]>;
  6415. def _SLASH_Zi : CLFlag<"Zi">, Alias<_SLASH_Z7>,
  6416. HelpText<"Like /Z7">;
  6417. def _SLASH_Zp : CLJoined<"Zp">,
  6418. HelpText<"Set default maximum struct packing alignment">,
  6419. Alias<fpack_struct_EQ>;
  6420. def _SLASH_Zp_flag : CLFlag<"Zp">,
  6421. HelpText<"Set default maximum struct packing alignment to 1">,
  6422. Alias<fpack_struct_EQ>, AliasArgs<["1"]>;
  6423. def _SLASH_Zs : CLFlag<"Zs">, HelpText<"Run the preprocessor, parser and semantic analysis stages">,
  6424. Alias<fsyntax_only>;
  6425. def _SLASH_openmp_ : CLFlag<"openmp-">,
  6426. HelpText<"Disable OpenMP support">, Alias<fno_openmp>;
  6427. def _SLASH_openmp : CLFlag<"openmp">, HelpText<"Enable OpenMP support">,
  6428. Alias<fopenmp>;
  6429. def _SLASH_openmp_experimental : CLFlag<"openmp:experimental">,
  6430. HelpText<"Enable OpenMP support with experimental SIMD support">,
  6431. Alias<fopenmp>;
  6432. def _SLASH_tune : CLCompileJoined<"tune:">,
  6433. HelpText<"Set CPU for optimization without affecting instruction set">,
  6434. Alias<mtune_EQ>;
  6435. def _SLASH_QIntel_jcc_erratum : CLFlag<"QIntel-jcc-erratum">,
  6436. HelpText<"Align branches within 32-byte boundaries to mitigate the performance impact of the Intel JCC erratum.">,
  6437. Alias<mbranches_within_32B_boundaries>;
  6438. def _SLASH_arm64EC : CLFlag<"arm64EC">,
  6439. HelpText<"Set build target to arm64ec">;
  6440. // Non-aliases:
  6441. def _SLASH_arch : CLCompileJoined<"arch:">,
  6442. HelpText<"Set architecture for code generation">;
  6443. def _SLASH_M_Group : OptionGroup<"</M group>">, Group<cl_compile_Group>;
  6444. def _SLASH_volatile_Group : OptionGroup<"</volatile group>">,
  6445. Group<cl_compile_Group>;
  6446. def _SLASH_EH : CLJoined<"EH">, HelpText<"Set exception handling model">;
  6447. def _SLASH_EP : CLFlag<"EP">,
  6448. HelpText<"Disable linemarker output and preprocess to stdout">;
  6449. def _SLASH_external_env : CLJoined<"external:env:">,
  6450. HelpText<"Add dirs in env var <var> to include search path with warnings suppressed">,
  6451. MetaVarName<"<var>">;
  6452. def _SLASH_FA : CLJoined<"FA">,
  6453. HelpText<"Output assembly code file during compilation">;
  6454. def _SLASH_Fa : CLJoined<"Fa">,
  6455. HelpText<"Set assembly output file name (with /FA)">,
  6456. MetaVarName<"<file or dir/>">;
  6457. def _SLASH_FI : CLJoinedOrSeparate<"FI">,
  6458. HelpText<"Include file before parsing">, Alias<include_>;
  6459. def _SLASH_Fe : CLJoined<"Fe">,
  6460. HelpText<"Set output executable file name">,
  6461. MetaVarName<"<file or dir/>">;
  6462. def _SLASH_Fe_COLON : CLJoined<"Fe:">, Alias<_SLASH_Fe>;
  6463. def _SLASH_Fi : CLCompileJoined<"Fi">,
  6464. HelpText<"Set preprocess output file name (with /P)">,
  6465. MetaVarName<"<file>">;
  6466. def _SLASH_Fo : CLCompileJoined<"Fo">,
  6467. HelpText<"Set output object file (with /c)">,
  6468. MetaVarName<"<file or dir/>">;
  6469. def _SLASH_guard : CLJoined<"guard:">,
  6470. HelpText<"Enable Control Flow Guard with /guard:cf, or only the table with /guard:cf,nochecks. "
  6471. "Enable EH Continuation Guard with /guard:ehcont">;
  6472. def _SLASH_GX : CLFlag<"GX">,
  6473. HelpText<"Deprecated; use /EHsc">;
  6474. def _SLASH_GX_ : CLFlag<"GX-">,
  6475. HelpText<"Deprecated (like not passing /EH)">;
  6476. def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">,
  6477. HelpText<"Add <dir> to system include search path, as if in %INCLUDE%">,
  6478. MetaVarName<"<dir>">;
  6479. def _SLASH_JMC : CLFlag<"JMC">,
  6480. HelpText<"Enable just-my-code debugging">;
  6481. def _SLASH_JMC_ : CLFlag<"JMC-">,
  6482. HelpText<"Disable just-my-code debugging (default)">;
  6483. def _SLASH_LD : CLFlag<"LD">, HelpText<"Create DLL">;
  6484. def _SLASH_LDd : CLFlag<"LDd">, HelpText<"Create debug DLL">;
  6485. def _SLASH_link : CLRemainingArgsJoined<"link">,
  6486. HelpText<"Forward options to the linker">, MetaVarName<"<options>">;
  6487. def _SLASH_MD : Option<["/", "-"], "MD", KIND_FLAG>, Group<_SLASH_M_Group>,
  6488. Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL run-time">;
  6489. def _SLASH_MDd : Option<["/", "-"], "MDd", KIND_FLAG>, Group<_SLASH_M_Group>,
  6490. Flags<[CLOption, NoXarchOption]>, HelpText<"Use DLL debug run-time">;
  6491. def _SLASH_MT : Option<["/", "-"], "MT", KIND_FLAG>, Group<_SLASH_M_Group>,
  6492. Flags<[CLOption, NoXarchOption]>, HelpText<"Use static run-time">;
  6493. def _SLASH_MTd : Option<["/", "-"], "MTd", KIND_FLAG>, Group<_SLASH_M_Group>,
  6494. Flags<[CLOption, NoXarchOption]>, HelpText<"Use static debug run-time">;
  6495. def _SLASH_o : CLJoinedOrSeparate<"o">,
  6496. HelpText<"Deprecated (set output file name); use /Fe or /Fe">,
  6497. MetaVarName<"<file or dir/>">;
  6498. def _SLASH_P : CLFlag<"P">, HelpText<"Preprocess to file">;
  6499. def _SLASH_permissive : CLFlag<"permissive">,
  6500. HelpText<"Enable some non conforming code to compile">;
  6501. def _SLASH_permissive_ : CLFlag<"permissive-">,
  6502. HelpText<"Disable non conforming code from compiling (default)">;
  6503. def _SLASH_Tc : CLCompileJoinedOrSeparate<"Tc">,
  6504. HelpText<"Treat <file> as C source file">, MetaVarName<"<file>">;
  6505. def _SLASH_TC : CLCompileFlag<"TC">, HelpText<"Treat all source files as C">;
  6506. def _SLASH_Tp : CLCompileJoinedOrSeparate<"Tp">,
  6507. HelpText<"Treat <file> as C++ source file">, MetaVarName<"<file>">;
  6508. def _SLASH_TP : CLCompileFlag<"TP">, HelpText<"Treat all source files as C++">;
  6509. def _SLASH_diasdkdir : CLJoinedOrSeparate<"diasdkdir">,
  6510. HelpText<"Path to the DIA SDK">, MetaVarName<"<dir>">;
  6511. def _SLASH_vctoolsdir : CLJoinedOrSeparate<"vctoolsdir">,
  6512. HelpText<"Path to the VCToolChain">, MetaVarName<"<dir>">;
  6513. def _SLASH_vctoolsversion : CLJoinedOrSeparate<"vctoolsversion">,
  6514. HelpText<"For use with /winsysroot, defaults to newest found">;
  6515. def _SLASH_winsdkdir : CLJoinedOrSeparate<"winsdkdir">,
  6516. HelpText<"Path to the Windows SDK">, MetaVarName<"<dir>">;
  6517. def _SLASH_winsdkversion : CLJoinedOrSeparate<"winsdkversion">,
  6518. HelpText<"Full version of the Windows SDK, defaults to newest found">;
  6519. def _SLASH_winsysroot : CLJoinedOrSeparate<"winsysroot">,
  6520. HelpText<"Same as \"/diasdkdir <dir>/DIA SDK\" /vctoolsdir <dir>/VC/Tools/MSVC/<vctoolsversion> \"/winsdkdir <dir>/Windows Kits/10\"">,
  6521. MetaVarName<"<dir>">;
  6522. def _SLASH_volatile_iso : Option<["/", "-"], "volatile:iso", KIND_FLAG>,
  6523. Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>,
  6524. HelpText<"Volatile loads and stores have standard semantics">;
  6525. def _SLASH_vmb : CLFlag<"vmb">,
  6526. HelpText<"Use a best-case representation method for member pointers">;
  6527. def _SLASH_vmg : CLFlag<"vmg">,
  6528. HelpText<"Use a most-general representation for member pointers">;
  6529. def _SLASH_vms : CLFlag<"vms">,
  6530. HelpText<"Set the default most-general representation to single inheritance">;
  6531. def _SLASH_vmm : CLFlag<"vmm">,
  6532. HelpText<"Set the default most-general representation to "
  6533. "multiple inheritance">;
  6534. def _SLASH_vmv : CLFlag<"vmv">,
  6535. HelpText<"Set the default most-general representation to "
  6536. "virtual inheritance">;
  6537. def _SLASH_volatile_ms : Option<["/", "-"], "volatile:ms", KIND_FLAG>,
  6538. Group<_SLASH_volatile_Group>, Flags<[CLOption, NoXarchOption]>,
  6539. HelpText<"Volatile loads and stores have acquire and release semantics">;
  6540. def _SLASH_clang : CLJoined<"clang:">,
  6541. HelpText<"Pass <arg> to the clang driver">, MetaVarName<"<arg>">;
  6542. def _SLASH_Zl : CLFlag<"Zl">, Alias<fms_omit_default_lib>,
  6543. HelpText<"Do not let object file auto-link default libraries">;
  6544. def _SLASH_Yc : CLJoined<"Yc">,
  6545. HelpText<"Generate a pch file for all code up to and including <filename>">,
  6546. MetaVarName<"<filename>">;
  6547. def _SLASH_Yu : CLJoined<"Yu">,
  6548. HelpText<"Load a pch file and use it instead of all code up to "
  6549. "and including <filename>">,
  6550. MetaVarName<"<filename>">;
  6551. def _SLASH_Y_ : CLFlag<"Y-">,
  6552. HelpText<"Disable precompiled headers, overrides /Yc and /Yu">;
  6553. def _SLASH_Zc_dllexportInlines : CLFlag<"Zc:dllexportInlines">,
  6554. HelpText<"dllexport/dllimport inline member functions of dllexport/import classes (default)">;
  6555. def _SLASH_Zc_dllexportInlines_ : CLFlag<"Zc:dllexportInlines-">,
  6556. HelpText<"Do not dllexport/dllimport inline member functions of dllexport/import classes">;
  6557. def _SLASH_Fp : CLJoined<"Fp">,
  6558. HelpText<"Set pch file name (with /Yc and /Yu)">, MetaVarName<"<file>">;
  6559. def _SLASH_Gd : CLFlag<"Gd">,
  6560. HelpText<"Set __cdecl as a default calling convention">;
  6561. def _SLASH_Gr : CLFlag<"Gr">,
  6562. HelpText<"Set __fastcall as a default calling convention">;
  6563. def _SLASH_Gz : CLFlag<"Gz">,
  6564. HelpText<"Set __stdcall as a default calling convention">;
  6565. def _SLASH_Gv : CLFlag<"Gv">,
  6566. HelpText<"Set __vectorcall as a default calling convention">;
  6567. def _SLASH_Gregcall : CLFlag<"Gregcall">,
  6568. HelpText<"Set __regcall as a default calling convention">;
  6569. // Ignored:
  6570. def _SLASH_analyze_ : CLIgnoredFlag<"analyze-">;
  6571. def _SLASH_bigobj : CLIgnoredFlag<"bigobj">;
  6572. def _SLASH_cgthreads : CLIgnoredJoined<"cgthreads">;
  6573. def _SLASH_d2FastFail : CLIgnoredFlag<"d2FastFail">;
  6574. def _SLASH_d2Zi_PLUS : CLIgnoredFlag<"d2Zi+">;
  6575. def _SLASH_errorReport : CLIgnoredJoined<"errorReport">;
  6576. def _SLASH_FC : CLIgnoredFlag<"FC">;
  6577. def _SLASH_Fd : CLIgnoredJoined<"Fd">;
  6578. def _SLASH_FS : CLIgnoredFlag<"FS">;
  6579. def _SLASH_kernel_ : CLIgnoredFlag<"kernel-">;
  6580. def _SLASH_nologo : CLIgnoredFlag<"nologo">;
  6581. def _SLASH_RTC : CLIgnoredJoined<"RTC">;
  6582. def _SLASH_sdl : CLIgnoredFlag<"sdl">;
  6583. def _SLASH_sdl_ : CLIgnoredFlag<"sdl-">;
  6584. def _SLASH_utf8 : CLIgnoredFlag<"utf-8">,
  6585. HelpText<"Set source and runtime encoding to UTF-8 (default)">;
  6586. def _SLASH_w : CLIgnoredJoined<"w">;
  6587. def _SLASH_Wv_ : CLIgnoredJoined<"Wv">;
  6588. def _SLASH_Zc___cplusplus : CLIgnoredFlag<"Zc:__cplusplus">;
  6589. def _SLASH_Zc_auto : CLIgnoredFlag<"Zc:auto">;
  6590. def _SLASH_Zc_forScope : CLIgnoredFlag<"Zc:forScope">;
  6591. def _SLASH_Zc_inline : CLIgnoredFlag<"Zc:inline">;
  6592. def _SLASH_Zc_rvalueCast : CLIgnoredFlag<"Zc:rvalueCast">;
  6593. def _SLASH_Zc_ternary : CLIgnoredFlag<"Zc:ternary">;
  6594. def _SLASH_Zm : CLIgnoredJoined<"Zm">;
  6595. def _SLASH_Zo : CLIgnoredFlag<"Zo">;
  6596. def _SLASH_Zo_ : CLIgnoredFlag<"Zo-">;
  6597. // Unsupported:
  6598. def _SLASH_await : CLFlag<"await">;
  6599. def _SLASH_await_COLON : CLJoined<"await:">;
  6600. def _SLASH_constexpr : CLJoined<"constexpr:">;
  6601. def _SLASH_AI : CLJoinedOrSeparate<"AI">;
  6602. def _SLASH_Bt : CLFlag<"Bt">;
  6603. def _SLASH_Bt_plus : CLFlag<"Bt+">;
  6604. def _SLASH_clr : CLJoined<"clr">;
  6605. def _SLASH_d1 : CLJoined<"d1">;
  6606. def _SLASH_d2 : CLJoined<"d2">;
  6607. def _SLASH_doc : CLJoined<"doc">;
  6608. def _SLASH_experimental : CLJoined<"experimental:">;
  6609. def _SLASH_exportHeader : CLFlag<"exportHeader">;
  6610. def _SLASH_external : CLJoined<"external:">;
  6611. def _SLASH_favor : CLJoined<"favor">;
  6612. def _SLASH_fsanitize_address_use_after_return : CLJoined<"fsanitize-address-use-after-return">;
  6613. def _SLASH_fno_sanitize_address_vcasan_lib : CLJoined<"fno-sanitize-address-vcasan-lib">;
  6614. def _SLASH_F : CLJoinedOrSeparate<"F">;
  6615. def _SLASH_Fm : CLJoined<"Fm">;
  6616. def _SLASH_Fr : CLJoined<"Fr">;
  6617. def _SLASH_FR : CLJoined<"FR">;
  6618. def _SLASH_FU : CLJoinedOrSeparate<"FU">;
  6619. def _SLASH_Fx : CLFlag<"Fx">;
  6620. def _SLASH_G1 : CLFlag<"G1">;
  6621. def _SLASH_G2 : CLFlag<"G2">;
  6622. def _SLASH_Ge : CLFlag<"Ge">;
  6623. def _SLASH_Gh : CLFlag<"Gh">;
  6624. def _SLASH_GH : CLFlag<"GH">;
  6625. def _SLASH_GL : CLFlag<"GL">;
  6626. def _SLASH_GL_ : CLFlag<"GL-">;
  6627. def _SLASH_Gm : CLFlag<"Gm">;
  6628. def _SLASH_Gm_ : CLFlag<"Gm-">;
  6629. def _SLASH_GT : CLFlag<"GT">;
  6630. def _SLASH_GZ : CLFlag<"GZ">;
  6631. def _SLASH_H : CLFlag<"H">;
  6632. def _SLASH_headername : CLJoined<"headerName:">;
  6633. def _SLASH_headerUnit : CLJoinedOrSeparate<"headerUnit">;
  6634. def _SLASH_headerUnitAngle : CLJoinedOrSeparate<"headerUnit:angle">;
  6635. def _SLASH_headerUnitQuote : CLJoinedOrSeparate<"headerUnit:quote">;
  6636. def _SLASH_homeparams : CLFlag<"homeparams">;
  6637. def _SLASH_kernel : CLFlag<"kernel">;
  6638. def _SLASH_LN : CLFlag<"LN">;
  6639. def _SLASH_MP : CLJoined<"MP">;
  6640. def _SLASH_Qfast_transcendentals : CLFlag<"Qfast_transcendentals">;
  6641. def _SLASH_QIfist : CLFlag<"QIfist">;
  6642. def _SLASH_Qimprecise_fwaits : CLFlag<"Qimprecise_fwaits">;
  6643. def _SLASH_Qpar : CLFlag<"Qpar">;
  6644. def _SLASH_Qpar_report : CLJoined<"Qpar-report">;
  6645. def _SLASH_Qsafe_fp_loads : CLFlag<"Qsafe_fp_loads">;
  6646. def _SLASH_Qspectre : CLFlag<"Qspectre">;
  6647. def _SLASH_Qspectre_load : CLFlag<"Qspectre-load">;
  6648. def _SLASH_Qspectre_load_cf : CLFlag<"Qspectre-load-cf">;
  6649. def _SLASH_Qvec_report : CLJoined<"Qvec-report">;
  6650. def _SLASH_reference : CLJoinedOrSeparate<"reference">;
  6651. def _SLASH_sourceDependencies : CLJoinedOrSeparate<"sourceDependencies">;
  6652. def _SLASH_sourceDependenciesDirectives : CLJoinedOrSeparate<"sourceDependencies:directives">;
  6653. def _SLASH_translateInclude : CLFlag<"translateInclude">;
  6654. def _SLASH_u : CLFlag<"u">;
  6655. def _SLASH_V : CLFlag<"V">;
  6656. def _SLASH_WL : CLFlag<"WL">;
  6657. def _SLASH_Wp64 : CLFlag<"Wp64">;
  6658. def _SLASH_Yd : CLFlag<"Yd">;
  6659. def _SLASH_Yl : CLJoined<"Yl">;
  6660. def _SLASH_Za : CLFlag<"Za">;
  6661. def _SLASH_Zc : CLJoined<"Zc:">;
  6662. def _SLASH_Ze : CLFlag<"Ze">;
  6663. def _SLASH_Zg : CLFlag<"Zg">;
  6664. def _SLASH_ZI : CLFlag<"ZI">;
  6665. def _SLASH_ZW : CLJoined<"ZW">;
  6666. //===----------------------------------------------------------------------===//
  6667. // clang-dxc Options
  6668. //===----------------------------------------------------------------------===//
  6669. def dxc_Group : OptionGroup<"<clang-dxc options>">, Flags<[DXCOption]>,
  6670. HelpText<"dxc compatibility options">;
  6671. class DXCFlag<string name> : Option<["/", "-"], name, KIND_FLAG>,
  6672. Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>;
  6673. class DXCJoinedOrSeparate<string name> : Option<["/", "-"], name,
  6674. KIND_JOINED_OR_SEPARATE>, Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>;
  6675. def dxc_help : Option<["/", "-", "--"], "help", KIND_JOINED>,
  6676. Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<help>,
  6677. HelpText<"Display available options">;
  6678. def dxc_no_stdinc : DXCFlag<"hlsl-no-stdinc">,
  6679. HelpText<"HLSL only. Disables all standard includes containing non-native compiler types and functions.">;
  6680. def Fo : DXCJoinedOrSeparate<"Fo">, Alias<o>,
  6681. HelpText<"Output object file">;
  6682. def dxil_validator_version : Option<["/", "-"], "validator-version", KIND_SEPARATE>,
  6683. Group<dxc_Group>, Flags<[DXCOption, NoXarchOption, CC1Option, HelpHidden]>,
  6684. HelpText<"Override validator version for module. Format: <major.minor>;"
  6685. "Default: DXIL.dll version or current internal version">,
  6686. MarshallingInfoString<TargetOpts<"DxilValidatorVersion">>;
  6687. def target_profile : DXCJoinedOrSeparate<"T">, MetaVarName<"<profile>">,
  6688. HelpText<"Set target profile">,
  6689. Values<"ps_6_0, ps_6_1, ps_6_2, ps_6_3, ps_6_4, ps_6_5, ps_6_6, ps_6_7,"
  6690. "vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7,"
  6691. "gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7,"
  6692. "hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6, hs_6_7,"
  6693. "ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5, ds_6_6, ds_6_7,"
  6694. "cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4, cs_6_5, cs_6_6, cs_6_7,"
  6695. "lib_6_3, lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_x,"
  6696. "ms_6_5, ms_6_6, ms_6_7,"
  6697. "as_6_5, as_6_6, as_6_7">;
  6698. def dxc_D : Option<["--", "/", "-"], "D", KIND_JOINED_OR_SEPARATE>,
  6699. Group<dxc_Group>, Flags<[DXCOption, NoXarchOption]>, Alias<D>;
  6700. def emit_pristine_llvm : DXCFlag<"emit-pristine-llvm">,
  6701. HelpText<"Emit pristine LLVM IR from the frontend by not running any LLVM passes at all."
  6702. "Same as -S + -emit-llvm + -disable-llvm-passes.">;
  6703. def fcgl : DXCFlag<"fcgl">, Alias<emit_pristine_llvm>;
  6704. def enable_16bit_types : DXCFlag<"enable-16bit-types">, Alias<fnative_half_type>,
  6705. HelpText<"Enable 16-bit types and disable min precision types."
  6706. "Available in HLSL 2018 and shader model 6.2.">;
  6707. def hlsl_entrypoint : Option<["-"], "hlsl-entry", KIND_SEPARATE>,
  6708. Group<dxc_Group>,
  6709. Flags<[CC1Option]>,
  6710. MarshallingInfoString<TargetOpts<"HLSLEntry">, "\"main\"">,
  6711. HelpText<"Entry point name for hlsl">;
  6712. def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>,
  6713. Group<dxc_Group>,
  6714. Flags<[DXCOption, NoXarchOption]>,
  6715. HelpText<"Entry point name">;