forked from OSchip/llvm-project
abort when we lower an initializer to the wrong type, as we currently do for:
char text[] = "string"; llvm-svn: 44752
This commit is contained in:
parent
686628e052
commit
cb04ac9599
|
@ -488,8 +488,8 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) {
|
|||
if (!Init)
|
||||
Init = EmitGlobalInit(D->getInit());
|
||||
|
||||
assert(Init && "FIXME: Global variable initializers unimp!");
|
||||
|
||||
assert(GV->getType()->getElementType() == Init->getType() &&
|
||||
"Initializer codegen type mismatch!");
|
||||
GV->setInitializer(Init);
|
||||
|
||||
// Set the llvm linkage type as appropriate.
|
||||
|
|
Loading…
Reference in New Issue