Extend the ASTContext constructor to delay the initialization of
builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
This commit is contained in:
@@ -52,9 +52,9 @@ namespace {
|
||||
virtual void Initialize(ASTContext &Context) {
|
||||
Ctx = &Context;
|
||||
|
||||
M->setTargetTriple(Ctx->Target.getTriple().getTriple());
|
||||
M->setDataLayout(Ctx->Target.getTargetDescription());
|
||||
TD.reset(new llvm::TargetData(Ctx->Target.getTargetDescription()));
|
||||
M->setTargetTriple(Ctx->getTargetInfo().getTriple().getTriple());
|
||||
M->setDataLayout(Ctx->getTargetInfo().getTargetDescription());
|
||||
TD.reset(new llvm::TargetData(Ctx->getTargetInfo().getTargetDescription()));
|
||||
Builder.reset(new CodeGen::CodeGenModule(Context, CodeGenOpts,
|
||||
*M, *TD, Diags));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user