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: http://review.tizen.org/git/?a=commitdiff_plain;h=5dc16e05d2b874641355330afaac144785f32221;p=platform%2Fupstream%2Fllvm.git IR: Fix GCC error from MDLocation::getInlinedAt() Apparently GCC didn't like my ternary operator from r225824. Use an `if`. llvm-svn: 225826 --- diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h index 10fc99f..f8e6f5b 100644 --- a/llvm/include/llvm/IR/Metadata.h +++ b/llvm/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) {