70163.patch 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From a94fa896cc92d5e0678376cf5aa8b64af0899732 Mon Sep 17 00:00:00 2001
  2. From: Nikita Popov <nikita.ppv@gmail.com>
  3. Date: Tue, 4 Feb 2020 20:35:50 +0100
  4. Subject: [PATCH 4/5] Fix timeTraceProfilerInitialize for LLVM 10
  5. ---
  6. src/rustllvm/PassWrapper.cpp | 6 +++++-
  7. 1 file changed, 5 insertions(+), 1 deletion(-)
  8. diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
  9. index 90d24d20737db..9e8614e3b6d34 100644
  10. --- a/src/rustllvm/PassWrapper.cpp
  11. +++ b/src/rustllvm/PassWrapper.cpp
  12. @@ -67,7 +67,11 @@ extern "C" void LLVMInitializePasses() {
  13. }
  14. extern "C" void LLVMTimeTraceProfilerInitialize() {
  15. -#if LLVM_VERSION_GE(9, 0)
  16. +#if LLVM_VERSION_GE(10, 0)
  17. + timeTraceProfilerInitialize(
  18. + /* TimeTraceGranularity */ 0,
  19. + /* ProcName */ "rustc");
  20. +#elif LLVM_VERSION_GE(9, 0)
  21. timeTraceProfilerInitialize();
  22. #endif
  23. }
  24. From 497f879b1e24c369362bcd821959ffabc50a8a31 Mon Sep 17 00:00:00 2001
  25. From: Nikita Popov <nikita.ppv@gmail.com>
  26. Date: Mon, 2 Mar 2020 22:37:55 +0100
  27. Subject: [PATCH 5/5] Update CreateMemSet() usage for LLVM 10
  28. ---
  29. src/rustllvm/RustWrapper.cpp | 5 +++++
  30. 1 file changed, 5 insertions(+)
  31. diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
  32. index 25cfee3373dc4..799adb418822d 100644
  33. --- a/src/rustllvm/RustWrapper.cpp
  34. +++ b/src/rustllvm/RustWrapper.cpp
  35. @@ -1333,8 +1333,13 @@ extern "C" LLVMValueRef LLVMRustBuildMemSet(LLVMBuilderRef B,
  36. LLVMValueRef Dst, unsigned DstAlign,
  37. LLVMValueRef Val,
  38. LLVMValueRef Size, bool IsVolatile) {
  39. +#if LLVM_VERSION_GE(10, 0)
  40. + return wrap(unwrap(B)->CreateMemSet(
  41. + unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile));
  42. +#else
  43. return wrap(unwrap(B)->CreateMemSet(
  44. unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile));
  45. +#endif
  46. }
  47. extern "C" LLVMValueRef