Fix CMake build on windows, from Cedric Venet

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2009-12-20 20:56:30 +00:00
Родитель f936815933
Коммит 04f81b1fa0
2 изменённых файлов: 10 добавлений и 23 удалений

Просмотреть файл

@ -17,10 +17,6 @@ set( LLVM_LINK_COMPONENTS
core
)
set( LLVM_LINK_COMPONENTS
mc
)
add_clang_executable(clang-wpa
clang-wpa.cpp
)

Просмотреть файл

@ -3745,28 +3745,19 @@ void Sema::ActOnUninitializedDecl(DeclPtrTy dcl,
InitType->isRecordType() && !InitType->isDependentType()) {
if (!RequireCompleteType(Var->getLocation(), InitType,
diag::err_invalid_incomplete_type_use)) {
ASTOwningVector<&ActionBase::DeleteExpr> ConstructorArgs(*this);
InitializedEntity Entity
= InitializedEntity::InitializeVariable(Var);
InitializationKind Kind
= InitializationKind::CreateDefault(Var->getLocation());
CXXConstructorDecl *Constructor
= PerformInitializationByConstructor(InitType,
MultiExprArg(*this, 0, 0),
Var->getLocation(),
SourceRange(Var->getLocation(),
Var->getLocation()),
Var->getDeclName(),
InitializationKind::CreateDefault(Var->getLocation()),
ConstructorArgs);
// FIXME: Location info for the variable initialization?
if (!Constructor)
InitializationSequence InitSeq(*this, Entity, Kind, 0, 0);
OwningExprResult Init = InitSeq.Perform(*this, Entity, Kind,
MultiExprArg(*this, 0, 0));
if (Init.isInvalid())
Var->setInvalidDecl();
else {
// FIXME: Cope with initialization of arrays
if (!Constructor->isTrivial() &&
InitializeVarWithConstructor(Var, Constructor,
move_arg(ConstructorArgs)))
Var->setInvalidDecl();
Var->setInit(Context,
MaybeCreateCXXExprWithTemporaries(Init.takeAs<Expr>()));
FinalizeVarWithDestructor(Var, InitType);
}
} else {