summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-04-04 12:01:43 +0000
committerClement Courbet <courbet@google.com>2018-04-04 12:01:43 +0000
commit96c09c5b0976464be05434d640c1bec407c9e8d6 (patch)
treeb4a03eafff2a5e7ab6bc0996b57fc06a1f037085
parent3f20fee55cc17bdb8a5e10d2e6661701df42c424 (diff)
downloadbcm5719-llvm-96c09c5b0976464be05434d640c1bec407c9e8d6.tar.gz
bcm5719-llvm-96c09c5b0976464be05434d640c1bec407c9e8d6.zip
[llvm-exegesis][NFC] Fix compilation warning.
llvm-svn: 329175
-rw-r--r--llvm/tools/llvm-exegesis/lib/InMemoryAssembler.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.h b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.h
index 751ea60ff26..11c5df0f477 100644
--- a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.h
+++ b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.h
@@ -65,7 +65,10 @@ public:
llvm::StringRef getFunctionBytes() const { return FunctionBytes; }
// Retrieves the callable function.
- void operator()() const { ((void (*)())FunctionBytes.data())(); }
+ void operator()() const {
+ char* const FnData = const_cast<char*>(FunctionBytes.data());
+ ((void (*)())FnData)();
+ }
private:
JitFunctionContext FunctionContext;
OpenPOWER on IntegriCloud