From: Duncan P. N. Exon Smith Date: Tue, 13 Jan 2015 20:50:21 +0000 (+0000) Subject: IR: Fix GCC error from MDLocation::getInlinedAt() X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=186399b7db9a694010bcadd82d6a430651181d3c;p=llvm IR: Fix GCC error from MDLocation::getInlinedAt() Apparently GCC didn't like my ternary operator from r225824. Use an `if`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225826 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/Metadata.h b/include/llvm/IR/Metadata.h index 10fc99f7b11..f8e6f5bd5ed 100644 --- a/include/llvm/IR/Metadata.h +++ b/include/llvm/IR/Metadata.h @@ -857,7 +857,9 @@ public: unsigned getColumn() const { return SubclassData16; } Metadata *getScope() const { return getOperand(0); } Metadata *getInlinedAt() const { - return getNumOperands() == 2 ? getOperand(1) : nullptr; + if (getNumOperands() == 2) + return getOperand(1); + return nullptr; } static bool classof(const Metadata *MD) {