summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-07-24 06:09:19 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-07-24 06:09:19 +0000
commit65f8732c146f92a6960f352e12959b613d32e848 (patch)
treeb5e073eaf6a298eeff641f76a0671620e9bc0e0b /clang/lib
parent3880089fc7e7b4c2be8eccb09379a02db9160189 (diff)
downloadbcm5719-llvm-65f8732c146f92a6960f352e12959b613d32e848.tar.gz
bcm5719-llvm-65f8732c146f92a6960f352e12959b613d32e848.zip
MS ABI: -fno-rtti-data wasn't data-free enough
While -fno-rtti-data would correctly avoid referencing the RTTI complete object locator in the VFTable itself, it would emit them anyway. llvm-svn: 213841
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index a69d4dd3fe8..0ab0940f96f 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -1179,7 +1179,9 @@ void MicrosoftCXXABI::emitVTableDefinitions(CodeGenVTables &CGVT,
if (VTable->hasInitializer())
continue;
- llvm::Constant *RTTI = getMSCompleteObjectLocator(RD, Info);
+ llvm::Constant *RTTI = getContext().getLangOpts().RTTIData
+ ? getMSCompleteObjectLocator(RD, Info)
+ : nullptr;
const VTableLayout &VTLayout =
VFTContext.getVFTableLayout(RD, Info->FullOffsetInMDC);
OpenPOWER on IntegriCloud