From 9a78334b969d662855bcfd52303db794c7dd7c8b Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 15 Sep 2014 17:50:22 +0000 Subject: [MCJIT] Start Stringref-izing the ExecutionEngine interface. More methods to follow. Using StringRef allows us the EE interface to work with more string types without forcing construction of std::strings. llvm-svn: 217794 --- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h | 2 +- llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 3 +-- llvm/lib/ExecutionEngine/MCJIT/MCJIT.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h index 70b07d5bece..0b620d1f8d7 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/llvm/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -116,7 +116,7 @@ public: GenericValue runFunction(Function *F, const std::vector &ArgValues) override; - void *getPointerToNamedFunction(const std::string &Name, + void *getPointerToNamedFunction(StringRef Name, bool AbortOnFailure = true) override { // FIXME: not implemented. return nullptr; diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index e441ec8d1a3..4cf3e2044df 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -517,8 +517,7 @@ GenericValue MCJIT::runFunction(Function *F, llvm_unreachable("Full-featured argument passing not supported yet!"); } -void *MCJIT::getPointerToNamedFunction(const std::string &Name, - bool AbortOnFailure) { +void *MCJIT::getPointerToNamedFunction(StringRef Name, bool AbortOnFailure) { if (!isSymbolSearchingDisabled()) { void *ptr = MemMgr.getPointerToNamedFunction(Name, false); if (ptr) diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h index 624a4317a3b..bc943b9b886 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h +++ b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h @@ -293,7 +293,7 @@ public: /// found, this function silently returns a null pointer. Otherwise, /// it prints a message to stderr and aborts. /// - void *getPointerToNamedFunction(const std::string &Name, + void *getPointerToNamedFunction(StringRef Name, bool AbortOnFailure = true) override; /// mapSectionAddress - map a section to its target address space value. -- cgit v1.2.3