Don't create a StringRef with a NULL value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2010-05-11 01:33:39 +00:00
parent 972bf8dea1
commit 3cbae239bb

View File

@ -389,6 +389,8 @@ void SubtargetFeatures::getDefaultSubtargetFeatures(const std::string &CPU,
break;
}
if (!Attrs) return;
StringRef SR(Attrs);
while (!SR.empty()) {