diff options
author | Anders Carlsson <andersca@mac.com> | 2010-01-02 18:46:23 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-01-02 18:46:23 +0000 |
commit | 9ed2059d7b0da1775bcd0e64621aa3d90c014dc0 (patch) | |
tree | 91c6063c9fe8b28b86db13dcfc24b43457d240df /lib/CodeGen/CGRTTI.cpp | |
parent | 21431c551d867962c66c92f0f96f652678f64c1c (diff) |
Speculative MSVC fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92421 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r-- | lib/CodeGen/CGRTTI.cpp | 5 |
1 files 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. |