llvm-nm: Fix warning.

llvm-svn: 123901
This commit is contained in:
Michael J. Spencer 2011-01-20 07:22:04 +00:00
parent c3f075e648
commit 7bcf23aa12

View File

@ -76,10 +76,10 @@ namespace {
static const Target *GetTarget(const ObjectFile *Obj = NULL) {
// Figure out the target triple.
llvm::Triple TT("unknown-unknown-unknown");
if (TripleName.empty())
if (TripleName.empty()) {
if (Obj)
TT.setArch(Triple::ArchType(Obj->getArch()));
else
} else
TT.setTriple(Triple::normalize(TripleName));
if (!ArchName.empty())