From 645ecb108a9676a7398dce75fbec07f8af1b3f64 Mon Sep 17 00:00:00 2001 From: Teresa Johnson Date: Fri, 26 Aug 2016 20:07:15 +0000 Subject: [PATCH] Streamline LTO getComdat invocation (NFC) We already have obtained a pointer to the underlying GlobalObject, use it directly to find the comdat, rather than using the GlobalValue::getComdat which will do the same thing again. llvm-svn: 279856 --- llvm/include/llvm/LTO/LTO.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/LTO/LTO.h b/llvm/include/llvm/LTO/LTO.h index 6bc2c39aa8b3..7672e5195dba 100644 --- a/llvm/include/llvm/LTO/LTO.h +++ b/llvm/include/llvm/LTO/LTO.h @@ -174,8 +174,8 @@ public: } else { GO = cast(GV); } - if (GV) - return GV->getComdat(); + if (GO) + return GO->getComdat(); return nullptr; } uint64_t getCommonSize() const {