From 9ed2059d7b0da1775bcd0e64621aa3d90c014dc0 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 2 Jan 2010 18:46:23 +0000 Subject: [PATCH] Speculative MSVC fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92421 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGRTTI.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp index db6c5075ed..20e5fcec56 100644 --- a/lib/CodeGen/CGRTTI.cpp +++ b/lib/CodeGen/CGRTTI.cpp @@ -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. -- 2.50.1