[llvm] r330817 - Avoid a warning on pointer casting, NFC
Gabor Buella via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 25 05:15:35 PDT 2018
Author: gbuella
Date: Wed Apr 25 05:15:34 2018
New Revision: 330817
URL: http://llvm.org/viewvc/llvm-project?rev=330817&view=rev
Log:
Avoid a warning on pointer casting, NFC
Reviewers: philip.pfaffe
Reviewed By: philip.pfaffe
Differential Revision: https://reviews.llvm.org/D46012
Modified:
llvm/trunk/unittests/Passes/PluginsTest.cpp
Modified: llvm/trunk/unittests/Passes/PluginsTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Passes/PluginsTest.cpp?rev=330817&r1=330816&r2=330817&view=diff
==============================================================================
--- llvm/trunk/unittests/Passes/PluginsTest.cpp (original)
+++ llvm/trunk/unittests/Passes/PluginsTest.cpp Wed Apr 25 05:15:34 2018
@@ -19,6 +19,8 @@
#include "TestPlugin.h"
+#include <cstdint>
+
using namespace llvm;
void anchor() {}
@@ -27,7 +29,7 @@ static std::string LibPath(const std::st
const std::vector<testing::internal::string> &Argvs =
testing::internal::GetArgvs();
const char *Argv0 = Argvs.size() > 0 ? Argvs[0].c_str() : "PluginsTests";
- void *Ptr = (void *)anchor;
+ void *Ptr = (void *)(intptr_t)anchor;
std::string Path = sys::fs::getMainExecutable(Argv0, Ptr);
llvm::SmallString<256> Buf{sys::path::parent_path(Path)};
sys::path::append(Buf, (Name + ".so").c_str());
More information about the llvm-commits
mailing list