[llvm] r279856 - Streamline LTO getComdat invocation (NFC)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 13:07:15 PDT 2016
Author: tejohnson
Date: Fri Aug 26 15:07:15 2016
New Revision: 279856
URL: http://llvm.org/viewvc/llvm-project?rev=279856&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/LTO/LTO.h
Modified: llvm/trunk/include/llvm/LTO/LTO.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LTO/LTO.h?rev=279856&r1=279855&r2=279856&view=diff
==============================================================================
--- llvm/trunk/include/llvm/LTO/LTO.h (original)
+++ llvm/trunk/include/llvm/LTO/LTO.h Fri Aug 26 15:07:15 2016
@@ -174,8 +174,8 @@ public:
} else {
GO = cast<GlobalObject>(GV);
}
- if (GV)
- return GV->getComdat();
+ if (GO)
+ return GO->getComdat();
return nullptr;
}
uint64_t getCommonSize() const {
More information about the llvm-commits
mailing list