mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
Use (void *)(intptr_t) to cast function addresses to void*
for use with sys::Path::GetMainExecutable, to avoid warnings with -pedantic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78245 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -232,8 +232,7 @@ AbstractInterpreter *AbstractInterpreter::createLLI(const char *Argv0,
|
|||||||
std::string &Message,
|
std::string &Message,
|
||||||
const std::vector<std::string> *ToolArgs) {
|
const std::vector<std::string> *ToolArgs) {
|
||||||
std::string LLIPath =
|
std::string LLIPath =
|
||||||
FindExecutable("lli", Argv0,
|
FindExecutable("lli", Argv0, (void *)(intptr_t)&createLLI).toString();
|
||||||
reinterpret_cast<void *>(&createLLI)).toString();
|
|
||||||
if (!LLIPath.empty()) {
|
if (!LLIPath.empty()) {
|
||||||
Message = "Found lli: " + LLIPath + "\n";
|
Message = "Found lli: " + LLIPath + "\n";
|
||||||
return new LLI(LLIPath, ToolArgs);
|
return new LLI(LLIPath, ToolArgs);
|
||||||
@@ -420,8 +419,7 @@ LLC *AbstractInterpreter::createLLC(const char *Argv0,
|
|||||||
const std::vector<std::string> *Args,
|
const std::vector<std::string> *Args,
|
||||||
const std::vector<std::string> *GCCArgs) {
|
const std::vector<std::string> *GCCArgs) {
|
||||||
std::string LLCPath =
|
std::string LLCPath =
|
||||||
FindExecutable("llc", Argv0,
|
FindExecutable("llc", Argv0, (void *)(intptr_t)&createLLC).toString();
|
||||||
reinterpret_cast<void *>(&createLLC)).toString();
|
|
||||||
if (LLCPath.empty()) {
|
if (LLCPath.empty()) {
|
||||||
Message = "Cannot find `llc' in executable directory or PATH!\n";
|
Message = "Cannot find `llc' in executable directory or PATH!\n";
|
||||||
return 0;
|
return 0;
|
||||||
@@ -507,8 +505,7 @@ int JIT::ExecuteProgram(const std::string &Bitcode,
|
|||||||
AbstractInterpreter *AbstractInterpreter::createJIT(const char *Argv0,
|
AbstractInterpreter *AbstractInterpreter::createJIT(const char *Argv0,
|
||||||
std::string &Message, const std::vector<std::string> *Args) {
|
std::string &Message, const std::vector<std::string> *Args) {
|
||||||
std::string LLIPath =
|
std::string LLIPath =
|
||||||
FindExecutable("lli", Argv0,
|
FindExecutable("lli", Argv0, (void *)(intptr_t)&createJIT).toString();
|
||||||
reinterpret_cast<void *>(&createJIT)).toString();
|
|
||||||
if (!LLIPath.empty()) {
|
if (!LLIPath.empty()) {
|
||||||
Message = "Found lli: " + LLIPath + "\n";
|
Message = "Found lli: " + LLIPath + "\n";
|
||||||
return new JIT(LLIPath, Args);
|
return new JIT(LLIPath, Args);
|
||||||
@@ -587,8 +584,7 @@ CBE *AbstractInterpreter::createCBE(const char *Argv0,
|
|||||||
const std::vector<std::string> *Args,
|
const std::vector<std::string> *Args,
|
||||||
const std::vector<std::string> *GCCArgs) {
|
const std::vector<std::string> *GCCArgs) {
|
||||||
sys::Path LLCPath =
|
sys::Path LLCPath =
|
||||||
FindExecutable("llc", Argv0,
|
FindExecutable("llc", Argv0, (void *)(intptr_t)&createCBE);
|
||||||
reinterpret_cast<void *>(&createCBE));
|
|
||||||
if (LLCPath.isEmpty()) {
|
if (LLCPath.isEmpty()) {
|
||||||
Message =
|
Message =
|
||||||
"Cannot find `llc' in executable directory or PATH!\n";
|
"Cannot find `llc' in executable directory or PATH!\n";
|
||||||
|
@@ -415,7 +415,7 @@ static void EmitShellScript(char **argv) {
|
|||||||
// build tree to the destination file.
|
// build tree to the destination file.
|
||||||
std::string ErrMsg;
|
std::string ErrMsg;
|
||||||
sys::Path llvmstub = FindExecutable("llvm-stub.exe", argv[0],
|
sys::Path llvmstub = FindExecutable("llvm-stub.exe", argv[0],
|
||||||
reinterpret_cast<void *>(&Optimize));
|
(void *)(intptr_t)&Optimize);
|
||||||
if (llvmstub.isEmpty())
|
if (llvmstub.isEmpty())
|
||||||
PrintAndExit("Could not find llvm-stub.exe executable!");
|
PrintAndExit("Could not find llvm-stub.exe executable!");
|
||||||
|
|
||||||
@@ -642,7 +642,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
// Determine the locations of the llc and gcc programs.
|
// Determine the locations of the llc and gcc programs.
|
||||||
sys::Path llc = FindExecutable("llc", argv[0],
|
sys::Path llc = FindExecutable("llc", argv[0],
|
||||||
reinterpret_cast<void *>(&Optimize));
|
(void *)(intptr_t)&Optimize);
|
||||||
if (llc.isEmpty())
|
if (llc.isEmpty())
|
||||||
PrintAndExit("Failed to find llc");
|
PrintAndExit("Failed to find llc");
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ int main(int argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
// Determine the locations of the llc and gcc programs.
|
// Determine the locations of the llc and gcc programs.
|
||||||
sys::Path llc = FindExecutable("llc", argv[0],
|
sys::Path llc = FindExecutable("llc", argv[0],
|
||||||
reinterpret_cast<void *>(&Optimize));
|
(void *)(intptr_t)&Optimize);
|
||||||
if (llc.isEmpty())
|
if (llc.isEmpty())
|
||||||
PrintAndExit("Failed to find llc");
|
PrintAndExit("Failed to find llc");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user