зеркало из https://github.com/microsoft/clang-1.git
abort when we lower an initializer to the wrong type, as we currently do for:
char text[] = "string"; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44752 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
5ccc7011e6
Коммит
f89dfb2924
|
@ -488,8 +488,8 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) {
|
||||||
if (!Init)
|
if (!Init)
|
||||||
Init = EmitGlobalInit(D->getInit());
|
Init = EmitGlobalInit(D->getInit());
|
||||||
|
|
||||||
assert(Init && "FIXME: Global variable initializers unimp!");
|
assert(GV->getType()->getElementType() == Init->getType() &&
|
||||||
|
"Initializer codegen type mismatch!");
|
||||||
GV->setInitializer(Init);
|
GV->setInitializer(Init);
|
||||||
|
|
||||||
// Set the llvm linkage type as appropriate.
|
// Set the llvm linkage type as appropriate.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче