diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp index 1f60acbd473..b687f29c659 100644 --- a/lib/LTO/LTOModule.cpp +++ b/lib/LTO/LTOModule.cpp @@ -396,7 +396,7 @@ void LTOModule::addDefinedSymbol(const GlobalValue *def, bool isFunction) { // set alignment part log2() can have rounding errors uint32_t align = def->getAlignment(); - uint32_t attr = align ? countTrailingZeros(def->getAlignment()) : 0; + uint32_t attr = align ? countTrailingZeros(align) : 0; // set permissions part if (isFunction) {