OSDN Git Service

[dsymutil] Don't try to load Swift ASTs as objects.
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 9 Apr 2018 09:09:59 +0000 (09:09 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 9 Apr 2018 09:09:59 +0000 (09:09 +0000)
commitd0a066beeeff504c588ce8242d0fdbe7e12dbba5
tree33544a060241b6d00d7df41af55f170dbe232c1e
parent099f934b4f04ab6654428bc634eadaec21b3eb91
[dsymutil] Don't try to load Swift ASTs as objects.

With the threading refactoring, loading of object files happens before
checking whether we're dealing with a swift AST. While that's not an
issue per se, it causes a warning to be printed:

  warning: /path/to/a.swiftmodule: The file was not recognized as a valid object file
  note: while processing /path/to/a.swiftmodule

This suppresses the warning by checking for a Swift AST before
attempting to load is as an object file.

rdar://39240444

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329553 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/dsymutil/X86/swift-ast-x86_64.test
tools/dsymutil/DwarfLinker.cpp