BUILD 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. py_binary(
  5. name = "migrate_cpp",
  6. srcs = ["migrate_cpp.py"],
  7. data = [
  8. ":clang_tidy.yaml",
  9. "//migrate_cpp/cpp_refactoring",
  10. ],
  11. python_version = "PY3",
  12. )
  13. cc_library(
  14. name = "output_segment",
  15. hdrs = ["output_segment.h"],
  16. deps = [
  17. "//common:check",
  18. "@llvm-project//clang:ast",
  19. ],
  20. )
  21. cc_library(
  22. name = "rewriter",
  23. srcs = ["rewriter.cpp"],
  24. hdrs = ["rewriter.h"],
  25. deps = [
  26. ":output_segment",
  27. "//common:check",
  28. "@llvm-project//clang:ast",
  29. "@llvm-project//clang:basic",
  30. "@llvm-project//clang:frontend",
  31. "@llvm-project//clang:lex",
  32. "@llvm-project//clang:tooling",
  33. "@llvm-project//clang:tooling_core",
  34. "@llvm-project//llvm:Support",
  35. ],
  36. )
  37. cc_test(
  38. name = "rewriter_test",
  39. srcs = ["rewriter_test.cpp"],
  40. deps = [
  41. ":rewriter",
  42. "//common:gtest_main",
  43. "@com_google_googletest//:gtest",
  44. "@llvm-project//clang:ast",
  45. "@llvm-project//clang:frontend",
  46. "@llvm-project//clang:tooling",
  47. ],
  48. )