Speculative MSVC fix.

llvm-svn: 92421
This commit is contained in:
Anders Carlsson 2010-01-02 18:46:23 +00:00
parent 93a1884fde
commit c92a37e917
1 changed files with 2 additions and 3 deletions

View File

@ -375,9 +375,8 @@ static llvm::GlobalVariable::LinkageTypes getTypeInfoLinkage(QualType Ty) {
// If the key function is defined, but inlined, then the RTTI descriptor is
// emitted with weak_odr linkage.
const FunctionDecl* KeyFunctionDefinition;
KeyFunction->getBody(KeyFunctionDefinition);
if (KeyFunctionDefinition->isInlined())
if (KeyFunction->getBody(KeyFunctionDefinition) &&
KeyFunctionDefinition->isInlined())
return llvm::GlobalValue::WeakODRLinkage;
// Otherwise, the RTTI descriptor is emitted with external linkage.