[llvm-dev] ErrorInfo::message() possibly broken in LLVM-4.0.1
Will Song via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 6 10:55:10 PDT 2017
Hello,
I have the following snippet of code that causes valgrind to freak out
over unitialized bytes.
llvm::Expected<llvm::object::OwningBinary<llvm::object::ObjectFile>> e
= llvm::object::ObjectFile::createObjectFile(llvm::StringRef(fname));
if (!e) {
llvm::handleAllErrors(e.takeError(),
[](const llvm::ErrorInfo<llvm::ECError> &EI) {
std::cerr << EI.message() << std::endl;
});
return 1;
}
Am I doing something wrong here?
--
Will Song
More information about the llvm-dev
mailing list