Skip to content

Compilations error fix #178

@Lexterl33t

Description

@Lexterl33t

As I've seen a number of problems with compilations recently, I've come up with a solution that works for me.

examples of patches I've made to the llvm version

Patch 1:

diff --git a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
index 8647db56c..4a631e00b 100755
--- a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
+++ b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
@@ -687,7 +687,7 @@ private:
 
   uint32_t getTrampolineSize() const { return RemoteTrampolineSize; }
 
-  Expected<std::vector<char>> readMem(char *Dst, JITTargetAddress Src,
+  Expected<std::vector<unsigned char>> readMem(char *Dst, JITTargetAddress Src,
                                       uint64_t Size) {
     // Check for an 'out-of-band' error, e.g. from an MM destructor.
     if (ExistingError)

Patch 2:

diff --git a/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 402521713..40a73ef74 100755
--- a/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -6271,7 +6271,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
   // Generate the code for the opening of the data environment. Capture all the
   // arguments of the runtime call by reference because they are used in the
   // closing of the region.
-  auto &&BeginThenGen = [&D, &CGF, Device, &Info, &CodeGen, &NoPrivAction](
+  auto &&BeginThenGen = [&D, Device, &Info, &CodeGen, &NoPrivAction](
       CodeGenFunction &CGF, PrePostActionTy &) {
     // Fill up the arrays with all the mapped variables.
     MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
@@ -6318,7 +6318,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(
   };
 
   // Generate code for the closing of the data region.
-  auto &&EndThenGen = [&CGF, Device, &Info](CodeGenFunction &CGF,
+  auto &&EndThenGen = [Device, &Info](CodeGenFunction &CGF,
                                             PrePostActionTy &) {
     assert(Info.isValid() && "Invalid data environment closing arguments.");
 
@@ -6397,7 +6397,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall(
          "Expecting either target enter, exit data, or update directives.");
 
   // Generate the code for the opening of the data environment.
-  auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
+  auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {
     // Fill up the arrays with all the mapped variables.
     MappableExprsHandler::MapBaseValuesArrayTy BasePointers;
     MappableExprsHandler::MapValuesArrayTy Pointers;

Patch 3:

diff --git a/tools/llvm-xray/xray-extract.cc b/tools/llvm-xray/xray-extract.cc
index ecd535114..2f39dd048 100755
--- a/tools/llvm-xray/xray-extract.cc
+++ b/tools/llvm-xray/xray-extract.cc
@@ -15,6 +15,7 @@
 
 #include <type_traits>
 #include <utility>
+#include <stdint.h>
 
 #include "xray-extract.h"
 
diff --git a/tools/llvm-xray/xray-extract.h b/tools/llvm-xray/xray-extract.h
index 91e4db368..9191f9ff2 100755
--- a/tools/llvm-xray/xray-extract.h
+++ b/tools/llvm-xray/xray-extract.h
@@ -19,6 +19,7 @@
 #include <map>
 #include <string>
 #include <unordered_map>
+#include <stdint.h>
 
 #include "xray-sleds.h"
 #include "llvm/Support/Error.h"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions