[cfe-commits] r92421 - /cfe/trunk/lib/CodeGen/CGRTTI.cpp

Anders Carlsson andersca at mac.com
Sat Jan 2 10:46:24 PST 2010


Author: andersca
Date: Sat Jan  2 12:46:23 2010
New Revision: 92421

URL: http://llvm.org/viewvc/llvm-project?rev=92421&view=rev
Log:
Speculative MSVC fix.

Modified:
    cfe/trunk/lib/CodeGen/CGRTTI.cpp

Modified: cfe/trunk/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGRTTI.cpp?rev=92421&r1=92420&r2=92421&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGRTTI.cpp Sat Jan  2 12:46:23 2010
@@ -375,9 +375,8 @@
     // 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.





More information about the cfe-commits mailing list