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
diff --git a/CodeGen/CodeGenModule.cpp b/CodeGen/CodeGenModule.cpp
index 866ba47..9a65d2e 100644
--- a/CodeGen/CodeGenModule.cpp
+++ b/CodeGen/CodeGenModule.cpp
@@ -121,7 +121,7 @@
   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());