Skip to content

Commit

Permalink
Update lldb-moduleimport-test for changed LLVM API.
Browse files Browse the repository at this point in the history
Swift SVN r31819
  • Loading branch information
gottesmm committed Sep 9, 2015
1 parent 1e3a73e commit 6f2a627
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ int main(int argc, char **argv) {
auto RawSym = Symbol.getRawDataRefImpl();
llvm::MachO::nlist nlist = MachO->getSymbolTableEntry(RawSym);
if (nlist.n_type == N_AST) {
llvm::StringRef Path;
if (MachO->getSymbolName(RawSym, Path)) {
auto Path = MachO->getSymbolName(RawSym);
if (Path.getError()) {
llvm::outs() << "Cannot get symbol name\n;";
exit(1);
}

auto fileBuf = llvm::MemoryBuffer::getFile(Path);
auto fileBuf = llvm::MemoryBuffer::getFile(*Path);
if (!fileBuf) {
llvm::outs() << "Cannot read from '" << Path
llvm::outs() << "Cannot read from '" << *Path
<< "': " << fileBuf.getError().message();
exit(1);
}
Expand Down

0 comments on commit 6f2a627

Please sign in to comment.