diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-09 18:47:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-09 18:47:25 +0000 |
commit | 19009e6fe7e0f51d2e49f4c94928a048c11c5281 (patch) | |
tree | 69ff6fa0eee830ef2aba3b4f0771b72303c24607 /CodeGen/CodeGenModule.cpp | |
parent | 88f50f31d84185827a8f765dd611134bcaface7b (diff) |
implement proper support for _Bool in memory, which is usually i8, not i1.
This fixes a crash reported by Seo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenModule.cpp')
-rw-r--r-- | CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp index 866ba47b2a..9a65d2e296 100644 --- a/CodeGen/CodeGenModule.cpp +++ b/CodeGen/CodeGenModule.cpp @@ -121,7 +121,7 @@ llvm::Constant *CodeGenModule::GetAddrOfGlobalVar(const VarDecl *D, llvm::Constant *&Entry = GlobalDeclMap[D]; if (Entry) return Entry; - const llvm::Type *Ty = getTypes().ConvertType(D->getType()); + const llvm::Type *Ty = getTypes().ConvertTypeForMem(D->getType()); // Check to see if the global already exists. llvm::GlobalVariable *GV = getModule().getGlobalVariable(D->getName()); |