Correctly test for the result of loadFile

git-svn-id: http://root.cern.ch/svn/root/trunk@47084 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
Philippe Canal 2012-11-06 22:42:02 +00:00
parent 0269fc8b08
commit bc63cc3bdd

View File

@ -282,7 +282,8 @@ namespace cling {
return false;
}
//TODO: Check if the file exists and is readable.
if (!m_Interp.loadFile(llvm::StringRef(Tok.getBufStart(), Tok.getLength()))) {
if (Interpreter::kSuccess
!= m_Interp.loadFile(llvm::StringRef(Tok.getBufStart(), Tok.getLength()))) {
llvm::errs() << "Load file failed.\n";
if (compRes) *compRes = Interpreter::kFailure;
}