summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-09-15 17:50:22 +0000
committerLang Hames <lhames@gmail.com>2014-09-15 17:50:22 +0000
commit9a78334b969d662855bcfd52303db794c7dd7c8b (patch)
tree1c55adabfcea6db4f6288fc87480d64eda82e599
parent7ee25502f6f8f2e0eb100aead2e57416998207c2 (diff)
downloadbcm5719-llvm-9a78334b969d662855bcfd52303db794c7dd7c8b.tar.gz
bcm5719-llvm-9a78334b969d662855bcfd52303db794c7dd7c8b.zip
[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
-rw-r--r--llvm/include/llvm/ExecutionEngine/ExecutionEngine.h2
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Interpreter.h2
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp3
-rw-r--r--llvm/lib/ExecutionEngine/MCJIT/MCJIT.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
index 78dd8cd0f85..5863d5759da 100644
--- a/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
+++ b/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
@@ -215,7 +215,7 @@ public:
/// it prints a message to stderr and aborts.
///
/// This function is deprecated for the MCJIT execution engine.
- virtual void *getPointerToNamedFunction(const std::string &Name,
+ virtual void *getPointerToNamedFunction(StringRef Name,
bool AbortOnFailure = true) = 0;
/// mapSectionAddress - map a section to its target address space value.
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<GenericValue> &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.
OpenPOWER on IntegriCloud