diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp index 2f37ede4402..39e045919ab 100644 --- a/lib/Target/TargetLoweringObjectFile.cpp +++ b/lib/Target/TargetLoweringObjectFile.cpp @@ -62,7 +62,7 @@ static bool isSuitableForBSS(const GlobalVariable *GV, bool NoZerosInBSS) { return false; // If the global has an explicit section specified, don't put it in BSS. - if (!GV->getSection().empty()) + if (GV->hasSection()) return false; // If -nozero-initialized-in-bss is specified, don't ever use BSS.