Skip to content

Commit

Permalink
[dsymutil] Not finding any debug info is not a fatal error
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245959 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
fredriss committed Aug 25, 2015
1 parent 5cb5994 commit 909125a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 8 additions & 0 deletions test/tools/dsymutil/ARM/empty-map.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# REQUIRES: object-emission
# RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs -y %s -o - 2>&1 | FileCheck %s

---
triple: 'thumbv7-apple-darwin'
...

# CHECK: warning: no debug symbols in executable (-arch thumbv7)
5 changes: 0 additions & 5 deletions tools/dsymutil/DwarfLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3034,11 +3034,6 @@ DwarfLinker::loadObject(BinaryHolder &BinaryHolder, DebugMapObject &Obj,

bool DwarfLinker::link(const DebugMap &Map) {

if (Map.begin() == Map.end()) {
errs() << "Empty debug map.\n";
return false;
}

if (!createStreamer(Map.getTriple(), OutputFilename))
return false;

Expand Down
4 changes: 4 additions & 0 deletions tools/dsymutil/dsymutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ int main(int argc, char **argv) {
if (DumpDebugMap)
continue;

if (Map->begin() == Map->end())
llvm::errs() << "warning: no debug symbols in executable (-arch "
<< Map->getTriple().getArchName() << ")\n";

std::string OutputFile = getOutputFileName(InputFile, NeedsTempFiles);
if (OutputFile.empty() || !linkDwarf(OutputFile, *Map, Options))
exitDsymutil(1);
Expand Down

0 comments on commit 909125a

Please sign in to comment.