llvm-nm: Fix warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123901 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer 2011-01-20 07:22:04 +00:00
parent db26073c6a
commit d11699d3c0

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