[dsymutil] Not finding any debug info is not a fatal error

llvm-svn: 245959
This commit is contained in:
Frederic Riss 2015-08-25 18:19:43 +00:00
parent 1015661edf
commit 80ab2bebaa
3 changed files with 12 additions and 5 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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);