Lines Matching refs:Invocation

33   CompilerInvocation Invocation;  member in __anon91b32dea0111::CommandLineTest
129 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
130 ASSERT_TRUE(Invocation.getFrontendOpts().UseTemporary); in TEST_F()
132 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
140 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
141 ASSERT_FALSE(Invocation.getFrontendOpts().UseTemporary); in TEST_F()
143 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
152 ASSERT_FALSE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
153 ASSERT_TRUE(Invocation.getFrontendOpts().UseTemporary); in TEST_F()
163 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
164 ASSERT_TRUE(Invocation.getCodeGenOpts().Autolink); in TEST_F()
166 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
174 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
175 ASSERT_FALSE(Invocation.getCodeGenOpts().Autolink); in TEST_F()
177 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
186 ASSERT_FALSE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
187 ASSERT_TRUE(Invocation.getCodeGenOpts().Autolink); in TEST_F()
197 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
198 ASSERT_FALSE(Invocation.getCodeGenOpts().NoInlineLineTables); in TEST_F()
200 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
208 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
209 ASSERT_TRUE(Invocation.getCodeGenOpts().NoInlineLineTables); in TEST_F()
211 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
220 ASSERT_FALSE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
221 ASSERT_FALSE(Invocation.getCodeGenOpts().NoInlineLineTables); in TEST_F()
231 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
232 ASSERT_FALSE(Invocation.getCodeGenOpts().CodeViewGHash); in TEST_F()
234 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
242 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
243 ASSERT_TRUE(Invocation.getCodeGenOpts().CodeViewGHash); in TEST_F()
245 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
254 ASSERT_FALSE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
255 ASSERT_FALSE(Invocation.getCodeGenOpts().CodeViewGHash); in TEST_F()
265 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
266 ASSERT_EQ(Invocation.getCodeGenOpts().ClearASTBeforeBackend, false); in TEST_F()
268 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
277 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
278 ASSERT_EQ(Invocation.getCodeGenOpts().ClearASTBeforeBackend, true); in TEST_F()
280 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
288 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
289 ASSERT_EQ(Invocation.getCodeGenOpts().ClearASTBeforeBackend, false); in TEST_F()
291 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
306 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
307 ASSERT_FALSE(Invocation.getCodeGenOpts().DebugPassManager); in TEST_F()
309 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
318 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
319 ASSERT_TRUE(Invocation.getCodeGenOpts().DebugPassManager); in TEST_F()
321 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
330 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
331 ASSERT_FALSE(Invocation.getCodeGenOpts().DebugPassManager); in TEST_F()
333 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
342 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
344 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
353 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
355 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
365 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
367 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
378 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
380 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
389 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
390 ASSERT_EQ(Invocation.getCodeGenOpts().RelocationModel, Reloc::Model::Static); in TEST_F()
392 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
403 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
404 ASSERT_EQ(Invocation.getCodeGenOpts().RelocationModel, Reloc::Model::PIC_); in TEST_F()
406 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
417 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
418 ASSERT_EQ(Invocation.getCodeGenOpts().getObjCDispatchMethod(), in TEST_F()
421 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
432 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
433 ASSERT_EQ(Invocation.getCodeGenOpts().getObjCDispatchMethod(), in TEST_F()
436 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
447 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
448 ASSERT_TRUE(Invocation.getFrontendOpts().ModuleMapFiles.empty()); in TEST_F()
450 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
458 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
459 ASSERT_EQ(Invocation.getFrontendOpts().ModuleMapFiles, in TEST_F()
462 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
471 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
472 ASSERT_TRUE(Invocation.getFrontendOpts().ModuleMapFiles == in TEST_F()
475 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
487 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
488 ASSERT_TRUE(Invocation.getLangOpts()->CommentOpts.BlockCommandNames.empty()); in TEST_F()
490 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
499 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
500 ASSERT_EQ(Invocation.getLangOpts()->CommentOpts.BlockCommandNames, in TEST_F()
503 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
513 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
514 ASSERT_EQ(Invocation.getLangOpts()->CommentOpts.BlockCommandNames, in TEST_F()
517 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
528 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
531 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsDevice); in TEST_F()
532 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F()
533 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_None); in TEST_F()
535 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
544 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
547 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsDevice); in TEST_F()
548 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F()
549 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_None); in TEST_F()
551 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
561 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
564 ASSERT_TRUE(Invocation.getLangOpts()->SYCLIsDevice); in TEST_F()
565 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F()
566 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_None); in TEST_F()
568 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
578 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
581 ASSERT_TRUE(Invocation.getLangOpts()->SYCLIsDevice); in TEST_F()
582 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F()
583 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_2017); in TEST_F()
585 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
595 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
598 ASSERT_TRUE(Invocation.getLangOpts()->SYCLIsDevice); in TEST_F()
599 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F()
600 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_2017); in TEST_F()
602 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
612 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
615 ASSERT_TRUE(Invocation.getLangOpts()->SYCLIsDevice); in TEST_F()
616 ASSERT_FALSE(Invocation.getLangOpts()->SYCLIsHost); in TEST_F()
617 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_2017); in TEST_F()
619 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
629 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
632 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), in TEST_F()
635 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
644 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
647 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), in TEST_F()
650 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
659 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
662 ASSERT_EQ(Invocation.getLangOpts()->getSYCLVersion(), LangOptions::SYCL_2017); in TEST_F()
664 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
675 CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags); in TEST_F()
678 ASSERT_EQ(Invocation.getHeaderSearchOpts().BuildSessionTimestamp, in TEST_F()
693 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
694 ASSERT_FALSE(Invocation.getLangOpts()->CLUnsafeMath); in TEST_F()
695 ASSERT_FALSE(Invocation.getCodeGenOpts().LessPreciseFPMAD); in TEST_F()
696 ASSERT_FALSE(Invocation.getLangOpts()->UnsafeFPMath); in TEST_F()
697 ASSERT_FALSE(Invocation.getLangOpts()->AllowRecip); in TEST_F()
699 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
712 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
714 ASSERT_TRUE(Invocation.getLangOpts()->CLUnsafeMath); in TEST_F()
716 ASSERT_TRUE(Invocation.getCodeGenOpts().LessPreciseFPMAD); in TEST_F()
717 ASSERT_TRUE(Invocation.getLangOpts()->UnsafeFPMath); in TEST_F()
719 ASSERT_TRUE(Invocation.getLangOpts()->AllowRecip); in TEST_F()
721 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
735 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
736 ASSERT_TRUE(Invocation.getLangOpts()->CLUnsafeMath); in TEST_F()
737 ASSERT_TRUE(Invocation.getCodeGenOpts().LessPreciseFPMAD); in TEST_F()
738 ASSERT_TRUE(Invocation.getLangOpts()->UnsafeFPMath); in TEST_F()
739 ASSERT_TRUE(Invocation.getLangOpts()->AllowRecip); in TEST_F()
741 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
755 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
756 ASSERT_FALSE(Invocation.getLangOpts()->CLUnsafeMath); in TEST_F()
757 ASSERT_TRUE(Invocation.getCodeGenOpts().LessPreciseFPMAD); in TEST_F()
758 ASSERT_TRUE(Invocation.getLangOpts()->UnsafeFPMath); in TEST_F()
759 ASSERT_TRUE(Invocation.getLangOpts()->AllowRecip); in TEST_F()
761 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
775 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
777 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
789 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
791 ASSERT_EQ(Invocation.getDiagnosticOpts().VerifyPrefixes, in TEST_F()
794 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
804 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
805 ASSERT_TRUE(Invocation.getLangOpts()->Digraphs); in TEST_F()
807 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
815 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
816 ASSERT_FALSE(Invocation.getLangOpts()->Digraphs); in TEST_F()
818 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
826 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
827 ASSERT_FALSE(Invocation.getLangOpts()->Digraphs); in TEST_F()
829 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
837 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
838 ASSERT_TRUE(Invocation.getLangOpts()->Digraphs); in TEST_F()
840 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
873 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
874 ASSERT_THAT(Invocation.getFrontendOpts().ModuleFileExtensions.size(), 2); in TEST_F()
879 Invocation.getFrontendOpts().ModuleFileExtensions.push_back( in TEST_F()
882 Invocation.generateCC1CommandLine(GeneratedArgs, *this); in TEST_F()
941 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()
943 ASSERT_TRUE(Invocation.getLangOpts()->C17); in TEST_F()
944 ASSERT_EQ(Invocation.getLangOpts()->MaxTokens, 10u); in TEST_F()
946 ASSERT_EQ(Invocation.getTargetOpts().SDKVersion, llvm::VersionTuple(1, 2, 3)); in TEST_F()
947 ASSERT_EQ(Invocation.getTargetOpts().EABIVersion, EABI::EABI4); in TEST_F()
949 ASSERT_THAT(Invocation.getDiagnosticOpts().UndefPrefixes, in TEST_F()
951 ASSERT_EQ(Invocation.getDiagnosticOpts().getFormat(), in TEST_F()
954 ASSERT_TRUE(Invocation.getHeaderSearchOpts().UseLibcxx); in TEST_F()
955 ASSERT_TRUE(Invocation.getHeaderSearchOpts().ImplicitModuleMaps); in TEST_F()
957 ASSERT_THAT(Invocation.getPreprocessorOpts().Macros, in TEST_F()
959 ASSERT_EQ(Invocation.getPreprocessorOpts().ImplicitPCHInclude, "a.pch"); in TEST_F()
961 ASSERT_EQ(Invocation.getAnalyzerOpts()->Config["ctu-import-threshold"], "42"); in TEST_F()
962 ASSERT_TRUE(Invocation.getAnalyzerOpts()->UnoptimizedCFG); in TEST_F()
964 ASSERT_TRUE(Invocation.getMigratorOpts().NoNSAllocReallocError); in TEST_F()
966 ASSERT_EQ(Invocation.getCodeGenOpts().getDebugInfo(), in TEST_F()
968 ASSERT_TRUE(Invocation.getCodeGenOpts().MacroDebugInfo); in TEST_F()
970 ASSERT_EQ(Invocation.getDependencyOutputOpts().ShowIncludesDest, in TEST_F()
972 ASSERT_TRUE(Invocation.getDependencyOutputOpts().ShowHeaderIncludes); in TEST_F()
983 ASSERT_TRUE(CompilerInvocation::CreateFromArgs(Invocation, Args, *Diags)); in TEST_F()