summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGCXXABI.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-07-07 06:20:47 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-07-07 06:20:47 +0000
commit4269ad98c81ba9e630c334fc299aae6fc2b7786a (patch)
tree18263fa350f3e0daa9bf387e28ae58f9af4e5678 /lib/CodeGen/CGCXXABI.cpp
parentd4689bbca1a7bd2151d28f62b0f625983b185451 (diff)
CodeGen: Refactor RTTI emission
Let's not expose ABI specific minutia inside of CodeGenModule and Type. Instead, let's abstract it through CXXABI. This gets rid of: CodeGenModule::getCompleteObjectLocator, CodeGenModule::EmitFundamentalTypeDescriptor{s,}, CodeGenModule::getMSTypeDescriptor, CodeGenModule::getMSCompleteObjectLocator, CGCXXABI::shouldRTTIBeUnique, CGCXXABI::classifyRTTIUniqueness. CGRTTI was *almost* entirely centered around providing Itanium-style RTTI information. Instead of providing interfaces that only it consumes, move it to the ItaniumCXXABI implementation file. This allows it to have access to Itanium-specific implementation details without providing useless expansion points for the Microsoft ABI side. Differential Revision: http://reviews.llvm.org/D4261 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212435 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXXABI.cpp')
-rw-r--r--lib/CodeGen/CGCXXABI.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/CodeGen/CGCXXABI.cpp b/lib/CodeGen/CGCXXABI.cpp
index ee65d77d4b..55ddd666c4 100644
--- a/lib/CodeGen/CGCXXABI.cpp
+++ b/lib/CodeGen/CGCXXABI.cpp
@@ -325,31 +325,3 @@ LValue CGCXXABI::EmitThreadLocalVarDeclLValue(CodeGenFunction &CGF,
bool CGCXXABI::NeedsVTTParameter(GlobalDecl GD) {
return false;
}
-
-/// What sort of uniqueness rules should we use for the RTTI for the
-/// given type?
-CGCXXABI::RTTIUniquenessKind
-CGCXXABI::classifyRTTIUniqueness(QualType CanTy,
- llvm::GlobalValue::LinkageTypes Linkage) {
- if (shouldRTTIBeUnique())
- return RUK_Unique;
-
- // It's only necessary for linkonce_odr or weak_odr linkage.
- if (Linkage != llvm::GlobalValue::LinkOnceODRLinkage &&
- Linkage != llvm::GlobalValue::WeakODRLinkage)
- return RUK_Unique;
-
- // It's only necessary with default visibility.
- if (CanTy->getVisibility() != DefaultVisibility)
- return RUK_Unique;
-
- // If we're not required to publish this symbol, hide it.
- if (Linkage == llvm::GlobalValue::LinkOnceODRLinkage)
- return RUK_NonUniqueHidden;
-
- // If we're required to publish this symbol, as we might be under an
- // explicit instantiation, leave it with default visibility but
- // enable string-comparisons.
- assert(Linkage == llvm::GlobalValue::WeakODRLinkage);
- return RUK_NonUniqueVisible;
-}