summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExecutionDriver.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-14 21:09:11 +0000
committerChris Lattner <sabre@nondot.org>2003-10-14 21:09:11 +0000
commitf8a84dbff3828465d4972ee34a60ed3aecdabb2e (patch)
treef27e295d800e2018a44a082de06014d369407154 /llvm/tools/bugpoint/ExecutionDriver.cpp
parent74d64c7d021dbb0bcecbb0b8d40ebe852d613d59 (diff)
downloadbcm5719-llvm-f8a84dbff3828465d4972ee34a60ed3aecdabb2e.tar.gz
bcm5719-llvm-f8a84dbff3828465d4972ee34a60ed3aecdabb2e.zip
The return value of compileSharedObject was never used. Return the shared
object's name instead llvm-svn: 9120
Diffstat (limited to 'llvm/tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r--llvm/tools/bugpoint/ExecutionDriver.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp
index f941713b3ab..17e2ce2378d 100644
--- a/llvm/tools/bugpoint/ExecutionDriver.cpp
+++ b/llvm/tools/bugpoint/ExecutionDriver.cpp
@@ -135,16 +135,16 @@ std::string BugDriver::executeProgramWithCBE(std::string OutputFile,
return executeProgram(OutputFile, BytecodeFile, SharedObject, cbe);
}
-int BugDriver::compileSharedObject(const std::string &BytecodeFile,
- std::string &SharedObject) {
+std::string BugDriver::compileSharedObject(const std::string &BytecodeFile) {
assert(Interpreter && "Interpreter should have been created already!");
- std::string Message, OutputCFile;
+ std::string OutputCFile;
// Using CBE
cbe->OutputC(BytecodeFile, OutputCFile);
#if 0 /* This is an alternative, as yet unimplemented */
// Using LLC
+ std::string Message;
LLC *llc = createLLCtool(Message);
if (llc->OutputAsm(BytecodeFile, OutputFile)) {
std::cerr << "Could not generate asm code with `llc', exiting.\n";
@@ -152,12 +152,14 @@ int BugDriver::compileSharedObject(const std::string &BytecodeFile,
}
#endif
- gcc->MakeSharedObject(OutputCFile, CFile, SharedObject);
+ std::string SharedObjectFile;
+ if (gcc->MakeSharedObject(OutputCFile, CFile, SharedObject))
+ exit(1);
// Remove the intermediate C file
removeFile(OutputCFile);
- return 0;
+ return SharedObjectFile;
}
OpenPOWER on IntegriCloud