Add sanity check in Clang TableGen backend to check if 'Component' is a string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67565 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2009-03-23 21:54:33 +00:00
parent 1b25cb2416
commit 13b9bf9022

View File

@ -113,7 +113,7 @@ void ClangDiagsDefsEmitter::run(std::ostream &OS) {
continue;
const StringInit* SV = dynamic_cast<const StringInit*>(V->getValue());
if (SV->getValue() != Component)
if (!SV || SV->getValue() != Component)
continue;
}