| /llvm-project-15.0.7/clang-tools-extra/clangd/unittests/ |
| H A D | CompileCommandsTests.cpp | 49 Mangler.adjust(Cmd, "foo.cc"); in TEST() 62 Mangler.adjust(Cmd, "foo.h"); in TEST() 72 Mangler.adjust(Cmd, "foo.cc"); in TEST() 81 Mangler.adjust(Cmd, "foo.cc"); in TEST() 91 Mangler.adjust(Cmd, "foo.cc"); in TEST() 95 Mangler.adjust(Cmd, "foo.cc"); in TEST() 99 Mangler.adjust(Cmd, "foo.cc"); in TEST() 103 Mangler.adjust(Cmd, "foo.cc"); in TEST() 146 Mangler.adjust(Cmd, "foo.cc"); in TEST() 162 Cmd = {"foo", "foo.cc"}; in TEST() [all …]
|
| H A D | BackgroundIndexTests.cpp | 104 tooling::CompileCommand Cmd; in TEST_F() local 124 Cmd.Filename = Filename; in TEST_F() 125 Cmd.Directory = testRoot(); in TEST_F() 154 for (auto &Cmd : Cmds) { in TEST_F() local 197 tooling::CompileCommand Cmd; in TEST_F() local 212 Cmd.CommandLine = {"clang++", Cmd.Filename}; in TEST_F() 538 Cmd.Filename = "../A.cc"; in TEST_F() 545 Cmd.Filename = "./B.cc"; in TEST_F() 577 Cmd.Filename = "../A.cc"; in TEST_F() 632 Cmd.Filename = "../A.cc"; in TEST_F() [all …]
|
| H A D | SerializationTests.cpp | 179 ASSERT_TRUE(bool(ParsedYAML->Cmd)); in TEST() 180 auto &Cmd = *ParsedYAML->Cmd; in TEST() local 282 tooling::CompileCommand Cmd; in TEST() local 283 Cmd.Directory = "testdir"; in TEST() 284 Cmd.CommandLine.push_back("cmd1"); in TEST() 285 Cmd.CommandLine.push_back("cmd2"); in TEST() 286 Cmd.Filename = "ignored"; in TEST() 287 Cmd.Heuristic = "ignored"; in TEST() 288 Cmd.Output = "ignored"; in TEST() 292 Out.Cmd = &Cmd; in TEST() [all …]
|
| H A D | GlobalCompilationDatabaseTests.cpp | 44 auto Cmd = DB.getFallbackCommand(testPath("foo/bar.cc")); in TEST() local 45 EXPECT_EQ(Cmd.Directory, testPath("foo")); in TEST() 47 EXPECT_EQ(Cmd.Output, ""); in TEST() 50 Cmd = DB.getFallbackCommand(testPath("foo/bar.h")); in TEST() 53 Cmd = DB.getFallbackCommand(testPath("foo/bar")); in TEST() 142 auto Ret = Cmd; in TEST_F() 148 auto Cmd = *CDB.getCompileCommand(testPath("foo.cc")); in TEST_F() local 157 Cmd = *CDB.getCompileCommand(testPath("bar.cc")); in TEST_F() 159 Cmd.CommandLine, in TEST_F() 163 Cmd = CDB.getFallbackCommand("baz.cc"); in TEST_F() [all …]
|
| /llvm-project-15.0.7/compiler-rt/lib/fuzzer/ |
| H A D | FuzzerFork.cpp | 66 Command Cmd; member 121 Command Cmd(Args); in CreateNewJob() local 122 Cmd.removeFlag("fork"); in CreateNewJob() 123 Cmd.removeFlag("runs"); in CreateNewJob() 126 Cmd.removeArgument(C); in CreateNewJob() 188 Cmd.combineOutAndErr(); in CreateNewJob() 190 Job->Cmd = Cmd; in CreateNewJob() 265 Command Cmd(Args); in CollectDFT() local 266 Cmd.removeFlag("fork"); in CollectDFT() 267 Cmd.removeFlag("runs"); in CollectDFT() [all …]
|
| H A D | FuzzerDataFlowTrace.cpp | 270 Command Cmd; in CollectDataFlow() local 271 Cmd.addArgument(DFTBinary); in CollectDataFlow() 272 Cmd.addArgument(F.File); in CollectDataFlow() 273 Cmd.addArgument(OutPath); in CollectDataFlow() 274 Printf("CMD: %s\n", Cmd.toString().c_str()); in CollectDataFlow() 275 ExecuteCommand(Cmd); in CollectDataFlow() 280 Command Cmd; in CollectDataFlow() local 281 Cmd.addArgument(DFTBinary); in CollectDataFlow() 282 Cmd.setOutputFile(FunctionsTxtPath); in CollectDataFlow() 283 ExecuteCommand(Cmd); in CollectDataFlow()
|
| H A D | FuzzerDriver.cpp | 236 Command Cmd(BaseCmd); in WorkerThread() local 237 Cmd.setOutputFile(Log); in WorkerThread() 238 Cmd.combineOutAndErr(); in WorkerThread() 277 std::string Cmd; in CloneArgsWithoutX() local 281 Cmd += S + " "; in CloneArgsWithoutX() 283 return Cmd; in CloneArgsWithoutX() 290 Command Cmd(Args); in RunInMultipleProcesses() local 291 Cmd.removeFlag("jobs"); in RunInMultipleProcesses() 361 Command Cmd(Args); in CleanseCrashInput() local 370 Cmd.combineOutAndErr(); in CleanseCrashInput() [all …]
|
| H A D | FuzzerUtilFuchsia.cpp | 431 int ExecuteCommand(const Command &Cmd) { in ExecuteCommand() argument 435 auto Args = Cmd.getArguments(); in ExecuteCommand() 452 if (Cmd.hasOutputFile()) { in ExecuteCommand() 453 std::string Path = Cmd.getOutputFile(); in ExecuteCommand() 460 if (!IsAbsolutePath && Cmd.hasFlag("artifact_prefix")) in ExecuteCommand() 461 Path = Cmd.getFlagValue("artifact_prefix") + "/" + Path; in ExecuteCommand() 478 if (Cmd.isOutAndErrCombined()) { in ExecuteCommand() 529 Command Cmd(BaseCmd); in ExecuteCommand() local 530 Cmd.setOutputFile(LogFilePath); in ExecuteCommand() 531 int Ret = ExecuteCommand(Cmd); in ExecuteCommand()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/ |
| H A D | QueryDriverDatabase.cpp | 240 addSystemIncludes(tooling::CompileCommand &Cmd, in addSystemIncludes() argument 250 auto InsertAt = llvm::find(Cmd.CommandLine, "--"); in addSystemIncludes() 254 return Cmd; in addSystemIncludes() 261 for (llvm::StringRef Arg : Cmd.CommandLine) { in setTarget() 263 return Cmd; in setTarget() 269 return Cmd; in setTarget() 329 if (!Cmd || Cmd->CommandLine.empty()) in getCompileCommand() 330 return Cmd; in getCompileCommand() 334 llvm::StringRef Arg = Cmd->CommandLine[I]; in getCompileCommand() 336 Lang = Cmd->CommandLine[I + 1]; in getCompileCommand() [all …]
|
| H A D | CompileCommands.cpp | 204 if (Cmd.empty()) in adjust() 210 for (const auto &S : Cmd) in adjust() 277 SawInput(Cmd[I]); in adjust() 284 [&Cmd](unsigned Idx) { Cmd.erase(Cmd.begin() + Idx + 1); }); in adjust() 287 Cmd.push_back("--"); in adjust() 296 assert(Cmd.size() >= 2 && Cmd.back() == File && in adjust() 297 Cmd[Cmd.size() - 2] == "--" && in adjust() 302 Edit(Cmd); in adjust() 329 Cmd.insert(llvm::find(Cmd, "--"), std::make_move_iterator(ToAppend.begin()), in adjust() 333 if (!Cmd.empty()) { in adjust() [all …]
|
| H A D | GlobalCompilationDatabase.cpp | 66 Cmd.Heuristic = "clangd fallback"; in getFallbackCommand() 67 return Cmd; in getFallbackCommand() 754 Cmd = It->second; in getCompileCommand() 756 if (!Cmd) in getCompileCommand() 758 if (!Cmd) in getCompileCommand() 761 Cmd->CommandLine = ArgsAdjuster(Cmd->CommandLine, File); in getCompileCommand() 762 return Cmd; in getCompileCommand() 768 Cmd.CommandLine.insert(Cmd.CommandLine.end(), FallbackFlags.begin(), in getFallbackCommand() 771 Cmd.CommandLine = ArgsAdjuster(Cmd.CommandLine, File); in getFallbackCommand() 772 return Cmd; in getFallbackCommand() [all …]
|
| /llvm-project-15.0.7/clang/tools/scan-build/bin/ |
| H A D | scan-build | 257 my $Cmd = $$Args[0]; 259 if ($Cmd =~ /configure/ || $Cmd =~ /autogen/) { 1084 my $Cmd = $Args->[0]; 1089 if ($Cmd =~ /\bxcodebuild$/) { 1096 if ($Cmd =~ /(.*\/?gcc[^\/]*$)/ or 1097 $Cmd =~ /(.*\/?cc[^\/]*$)/ or 1120 elsif ($Cmd eq "make" or $Cmd eq "gmake" or $Cmd eq "mingw32-make") { 1905 if (!defined $Cmd || ! -e $Cmd) { 1906 $Cmd = "$AbsRealBin/ccc-analyzer"; 1907 DieDiag("'ccc-analyzer' does not exist at '$Cmd'\n") if(! -e $Cmd); [all …]
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/index/ |
| H A D | Background.cpp | 69 AbsolutePath = Cmd.Filename; in getAbsolutePath() 71 AbsolutePath = Cmd.Directory; in getAbsolutePath() 162 auto Cmd = CDB.getCompileCommand(Path); in indexFileTask() local 163 if (!Cmd) in indexFileTask() 165 if (auto Error = index(std::move(*Cmd))) in indexFileTask() 219 IF->Cmd.reset(); in update() 254 SPAN_ATTACH(Tracer, "file", Cmd.Filename); in index() 255 auto AbsolutePath = getAbsolutePath(Cmd); in index() 257 auto FS = TFS.view(Cmd.Directory); in index() 273 Inputs.CompileCommand = std::move(Cmd); in index() [all …]
|
| H A D | Serialization.h | 49 llvm::Optional<tooling::CompileCommand> Cmd; member 63 const tooling::CompileCommand *Cmd = nullptr; member 71 Cmd(I.Cmd ? I.Cmd.getPointer() : nullptr) {} in IndexFileOut()
|
| H A D | YAMLSerialization.cpp | 43 llvm::Optional<clang::tooling::CompileCommand> Cmd; member 349 static void mapping(IO &IO, CompileCommandYAML &Cmd) { in mapping() 350 IO.mapRequired("Directory", Cmd.Directory); in mapping() 351 IO.mapRequired("CommandLine", Cmd.CommandLine); in mapping() 375 Variant.Cmd.emplace(); in mapping() 414 if (O.Cmd) { in writeYAML() 416 Entry.Cmd = *O.Cmd; in writeYAML() 431 llvm::Optional<tooling::CompileCommand> Cmd; in readYAML() local 457 if (Variant.Cmd) in readYAML() 458 Cmd = *Variant.Cmd; in readYAML() [all …]
|
| H A D | Serialization.cpp | 430 writeVar(Cmd.CommandLine.size(), CmdOS); in writeCompileCommand() 431 for (llvm::StringRef C : Cmd.CommandLine) in writeCompileCommand() 437 InternedCompileCommand Cmd; in readCompileCommand() local 440 return Cmd; in readCompileCommand() 443 return Cmd; in readCompileCommand() 538 InternedCompileCommand Cmd = in readRIFF() local 542 Result.Cmd.emplace(); in readRIFF() 543 Result.Cmd->Directory = std::string(Cmd.Directory); in readRIFF() 544 Result.Cmd->CommandLine.reserve(Cmd.CommandLine.size()); in readRIFF() 606 if (Data.Cmd) { in writeRIFF() [all …]
|
| /llvm-project-15.0.7/clang/lib/Tooling/ |
| H A D | GuessTargetAndModeCompilationDatabase.cpp | 40 for (auto &Cmd : Cmds) { in addTargetAndMode() local 41 if (Cmd.CommandLine.empty()) in addTargetAndMode() 43 addTargetAndModeForProgramName(Cmd.CommandLine, Cmd.CommandLine.front()); in addTargetAndMode()
|
| H A D | ExpandResponseFilesCompilationDatabase.cpp | 51 for (auto &Cmd : Cmds) { in expand() local 54 Argv.reserve(Cmd.CommandLine.size()); in expand() 55 for (auto &Arg : Cmd.CommandLine) { in expand() 65 llvm::StringRef(Cmd.Directory), *FS); in expand() 68 Cmd.CommandLine = std::move(ExpandedArgv); in expand()
|
| H A D | InterpolatingCompilationDatabase.cpp | 130 CompileCommand Cmd; member 139 : Cmd(std::move(C)), Type(guessType(Cmd.Filename)) { in TransferableCommand() 140 std::vector<std::string> OldArgs = std::move(Cmd.CommandLine); in TransferableCommand() 141 Cmd.CommandLine.clear(); in TransferableCommand() 161 Cmd.CommandLine.emplace_back(OldArgs.front()); in TransferableCommand() 201 Cmd.CommandLine.insert(Cmd.CommandLine.end(), in TransferableCommand() 217 CompileCommand Result = std::move(Cmd); in transferTo() 544 tooling::CompileCommand transferCompileCommand(CompileCommand Cmd, in transferCompileCommand() argument 546 return TransferableCommand(std::move(Cmd)).transferTo(Filename); in transferCompileCommand()
|
| /llvm-project-15.0.7/compiler-rt/lib/fuzzer/tests/ |
| H A D | FuzzerUnittest.cpp | 1276 Command Cmd; in TEST() local 1280 CmdLine = Cmd.toString(); in TEST() 1283 Cmd.addArgument("waldo"); in TEST() 1286 CmdLine = Cmd.toString(); in TEST() 1292 CmdLine = Cmd.toString(); in TEST() 1299 Command Cmd(ArgsToAdd); in TEST() local 1306 CmdLine = Cmd.toString(); in TEST() 1315 CmdLine = Cmd.toString(); in TEST() 1318 Cmd.removeFlag("fred"); in TEST() 1331 Command Cmd(ArgsToAdd); in TEST() local [all …]
|
| /llvm-project-15.0.7/clang/lib/Frontend/ |
| H A D | CreateInvocationFromCommandLine.cpp | 93 auto Cmd = llvm::find_if(Jobs, [](const driver::Command &Cmd) { in createInvocation() local 94 return StringRef(Cmd.getCreator().getName()) == "clang"; in createInvocation() 96 if (Cmd == Jobs.end()) { in createInvocation() 101 const ArgStringList &CCArgs = Cmd->getArguments(); in createInvocation()
|
| /llvm-project-15.0.7/clang/tools/libclang/ |
| H A D | CXCompilationDatabase.cpp | 41 AllocatedCXCompileCommands(std::vector<CompileCommand> Cmd) in AllocatedCXCompileCommands() 42 : CCmd(std::move(Cmd)) {} in AllocatedCXCompileCommands() 137 CompileCommand *Cmd = static_cast<CompileCommand *>(CCmd); in clang_CompileCommand_getArg() local 139 if (Arg >= Cmd->CommandLine.size()) in clang_CompileCommand_getArg() 142 return cxstring::createRef(Cmd->CommandLine[Arg].c_str()); in clang_CompileCommand_getArg()
|
| /llvm-project-15.0.7/clang-tools-extra/clangd/tool/ |
| H A D | Check.cpp | 78 tooling::CompileCommand Cmd; member in clang::clangd::__anon6f28e4d60111::Checker 113 Cmd = std::move(*TrueCmd); in buildCommand() 115 Cmd.Heuristic.empty() ? "from CDB" : Cmd.Heuristic, in buildCommand() 116 printArgv(Cmd.CommandLine)); in buildCommand() 118 Cmd = CDB->getFallbackCommand(File); in buildCommand() 119 log("Generic fallback command is: {0}", printArgv(Cmd.CommandLine)); in buildCommand() 130 Inputs.CompileCommand = Cmd; in buildInvocation()
|
| /llvm-project-15.0.7/llvm/tools/dsymutil/ |
| H A D | MachOUtils.cpp | 412 MachO::build_version_command Cmd; in generateDsymCompanion() local 413 memset(&Cmd, 0, sizeof(Cmd)); in generateDsymCompanion() 416 LoadCommandSize += sizeof(Cmd); in generateDsymCompanion() 418 Cmd.ntools = 0; in generateDsymCompanion() 419 BuildVersionCmd.push_back(Cmd); in generateDsymCompanion() 522 for (auto Cmd : BuildVersionCmd) { in generateDsymCompanion() local 523 Writer.W.write<uint32_t>(Cmd.cmd); in generateDsymCompanion() 524 Writer.W.write<uint32_t>(sizeof(Cmd)); in generateDsymCompanion() 526 Writer.W.write<uint32_t>(Cmd.minos); in generateDsymCompanion() 527 Writer.W.write<uint32_t>(Cmd.sdk); in generateDsymCompanion() [all …]
|
| /llvm-project-15.0.7/llvm/tools/llvm-symbolizer/ |
| H A D | llvm-symbolizer.cpp | 132 StringRef InputString, Command &Cmd, in parseCommand() argument 139 Cmd = Command::Code; in parseCommand() 141 Cmd = Command::Data; in parseCommand() 143 Cmd = Command::Frame; in parseCommand() 146 Cmd = Command::Code; in parseCommand() 209 void executeCommand(StringRef ModuleName, const T &ModuleSpec, Command Cmd, in executeCommand() argument 216 if (Cmd == Command::Data) { in executeCommand() 219 } else if (Cmd == Command::Frame) { in executeCommand() 255 Command Cmd; in symbolizeInput() local 260 StringRef(InputString), Cmd, ModuleName, BuildID, Offset)) { in symbolizeInput() [all …]
|