reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/unittests/Driver/ToolChainTest.cpp
  201   EXPECT_TRUE(Res.TargetPrefix.empty());
  202   EXPECT_TRUE(Res.ModeSuffix == "clang");
  203   EXPECT_TRUE(Res.DriverMode == nullptr);
  204   EXPECT_FALSE(Res.TargetIsValid);
  206   Res = ToolChain::getTargetAndModeFromProgramName("clang++");
  207   EXPECT_TRUE(Res.TargetPrefix.empty());
  208   EXPECT_TRUE(Res.ModeSuffix == "clang++");
  209   EXPECT_STREQ(Res.DriverMode, "--driver-mode=g++");
  210   EXPECT_FALSE(Res.TargetIsValid);
  212   Res = ToolChain::getTargetAndModeFromProgramName("clang++6.0");
  213   EXPECT_TRUE(Res.TargetPrefix.empty());
  214   EXPECT_TRUE(Res.ModeSuffix == "clang++");
  215   EXPECT_STREQ(Res.DriverMode, "--driver-mode=g++");
  216   EXPECT_FALSE(Res.TargetIsValid);
  218   Res = ToolChain::getTargetAndModeFromProgramName("clang++-release");
  219   EXPECT_TRUE(Res.TargetPrefix.empty());
  220   EXPECT_TRUE(Res.ModeSuffix == "clang++");
  221   EXPECT_STREQ(Res.DriverMode, "--driver-mode=g++");
  222   EXPECT_FALSE(Res.TargetIsValid);
  224   Res = ToolChain::getTargetAndModeFromProgramName("x86_64-clang++");
  225   EXPECT_TRUE(Res.TargetPrefix == "x86_64");
  226   EXPECT_TRUE(Res.ModeSuffix == "clang++");
  227   EXPECT_STREQ(Res.DriverMode, "--driver-mode=g++");
  228   EXPECT_TRUE(Res.TargetIsValid);
  230   Res = ToolChain::getTargetAndModeFromProgramName(
  232   EXPECT_TRUE(Res.TargetPrefix == "x86_64-linux-gnu");
  233   EXPECT_TRUE(Res.ModeSuffix == "clang-c++");
  234   EXPECT_STREQ(Res.DriverMode, "--driver-mode=g++");
  235   EXPECT_TRUE(Res.TargetIsValid);
  237   Res = ToolChain::getTargetAndModeFromProgramName(
  239   EXPECT_TRUE(Res.TargetPrefix == "x86_64-linux-gnu");
  240   EXPECT_TRUE(Res.ModeSuffix == "clang-c++");
  241   EXPECT_STREQ(Res.DriverMode, "--driver-mode=g++");
  242   EXPECT_TRUE(Res.TargetIsValid);
  244   Res = ToolChain::getTargetAndModeFromProgramName("qqq");
  245   EXPECT_TRUE(Res.TargetPrefix.empty());
  246   EXPECT_TRUE(Res.ModeSuffix.empty());
  247   EXPECT_TRUE(Res.DriverMode == nullptr);
  248   EXPECT_FALSE(Res.TargetIsValid);
  250   Res = ToolChain::getTargetAndModeFromProgramName("x86_64-qqq");
  251   EXPECT_TRUE(Res.TargetPrefix.empty());
  252   EXPECT_TRUE(Res.ModeSuffix.empty());
  253   EXPECT_TRUE(Res.DriverMode == nullptr);
  254   EXPECT_FALSE(Res.TargetIsValid);
  256   Res = ToolChain::getTargetAndModeFromProgramName("qqq-clang-cl");
  257   EXPECT_TRUE(Res.TargetPrefix == "qqq");
  258   EXPECT_TRUE(Res.ModeSuffix == "clang-cl");
  259   EXPECT_STREQ(Res.DriverMode, "--driver-mode=cl");
  260   EXPECT_FALSE(Res.TargetIsValid);