Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. diff --git a/lib/Target/JSBackend/JSBackend.cpp b/lib/Target/JSBackend/JSBackend.cpp
  2. index d959102..f96ad7e 100644
  3. --- a/lib/Target/JSBackend/JSBackend.cpp
  4. +++ b/lib/Target/JSBackend/JSBackend.cpp
  5. @@ -14,6 +14,7 @@
  6. //
  7. //===----------------------------------------------------------------------===//
  8.  
  9. +#include "tostr.h"
  10. #include "JSTargetMachine.h"
  11. #include "MCTargetDesc/JSBackendMCTargetDesc.h"
  12. #include "AllocaManager.h"
  13. diff --git a/lib/Target/JSBackend/tostr.h b/lib/Target/JSBackend/tostr.h
  14. new file mode 100644
  15. index 0000000..4ef386e
  16. --- /dev/null
  17. +++ b/lib/Target/JSBackend/tostr.h
  18. @@ -0,0 +1,16 @@
  19. +#include <string>
  20. +#include <sstream>
  21. +
  22. +namespace std
  23. +{
  24. +
  25. +static std::string to_string(int a)
  26. +{
  27. + std::stringstream ss;
  28. +
  29. + ss << a;
  30. +
  31. + return ss.str();
  32. +}
  33. +
  34. +}
  35. diff --git a/tools/sancov/sancov.cc b/tools/sancov/sancov.cc
  36. index 55b0370..ecaaaff 100644
  37. --- a/tools/sancov/sancov.cc
  38. +++ b/tools/sancov/sancov.cc
  39. @@ -10,6 +10,7 @@
  40. // This file is a command-line tool for reading and analyzing sanitizer
  41. // coverage.
  42. //===----------------------------------------------------------------------===//
  43. +#include "tostr.h"
  44. #include "llvm/ADT/STLExtras.h"
  45. #include "llvm/ADT/Twine.h"
  46. #include "llvm/DebugInfo/Symbolize/Symbolize.h"
  47. diff --git a/tools/sancov/tostr.h b/tools/sancov/tostr.h
  48. new file mode 100644
  49. index 0000000..4ef386e
  50. --- /dev/null
  51. +++ b/tools/sancov/tostr.h
  52. @@ -0,0 +1,16 @@
  53. +#include <string>
  54. +#include <sstream>
  55. +
  56. +namespace std
  57. +{
  58. +
  59. +static std::string to_string(int a)
  60. +{
  61. + std::stringstream ss;
  62. +
  63. + ss << a;
  64. +
  65. + return ss.str();
  66. +}
  67. +
  68. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement