]> granicus.if.org Git - clang/commitdiff
Speculative MSVC fix.
authorAnders Carlsson <andersca@mac.com>
Sat, 2 Jan 2010 18:46:23 +0000 (18:46 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 2 Jan 2010 18:46:23 +0000 (18:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92421 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGRTTI.cpp

index db6c5075ede4ec827f27e98c4f7ed9612d7aeecf..20e5fcec56845514e8ffb0a365b7432dd4d43b1d 100644 (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.