aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-02-03 02:08:44 +0000
committerAnders Carlsson <andersca@mac.com>2011-02-03 02:08:44 +0000
commitaedd9d5ad3cc776fd61457050bcd54cac4c5ea66 (patch)
treee87d32a8c47c8825b7774c82088568999cb01285 /lib/CodeGen/CodeGenModule.h
parentb51eee43676c2f4b7c4e1fa1648b438051b2b098 (diff)
Don't try to mark virtual members referenced for classes where the key function
is not defined in the current translation unit. Doing so lead to compile errors such as PR9114. Instead, when CodeGen is building the vtable, don't try to emit a definition for functions that aren't marked used in the current translation unit. Fixes PR9114. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 7652b88fdc..00f88f6f5a 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -317,7 +317,8 @@ public:
/// non-null, then this function will use the specified type if it has to
/// create it.
llvm::Constant *GetAddrOfFunction(GlobalDecl GD,
- const llvm::Type *Ty = 0);
+ const llvm::Type *Ty = 0,
+ bool ForVTable = false);
/// GetAddrOfRTTIDescriptor - Get the address of the RTTI descriptor
/// for the given type.
@@ -541,7 +542,8 @@ private:
llvm::Constant *GetOrCreateLLVMFunction(llvm::StringRef MangledName,
const llvm::Type *Ty,
- GlobalDecl D);
+ GlobalDecl D,
+ bool ForVTable);
llvm::Constant *GetOrCreateLLVMGlobal(llvm::StringRef MangledName,
const llvm::PointerType *PTy,
const VarDecl *D,