diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-11-05 23:58:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-11-05 23:58:27 +0000 |
commit | d612566385cb20fb867af6d8d6e0c5f138a963d7 (patch) | |
tree | 0175436a0bb676dbb4bb5a060517abdaaf6946ea /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 48c5b8e6592523b75202c0e3ab95c8acba2465aa (diff) | |
download | bcm5719-llvm-d612566385cb20fb867af6d8d6e0c5f138a963d7.tar.gz bcm5719-llvm-d612566385cb20fb867af6d8d6e0c5f138a963d7.zip |
Have the parser initialize Sema before it consumes the first
token. This is important because the first token could actually be
after an #include that triggers a module import, which might use
either Sema or the AST consumer before it would have been initialized.
llvm-svn: 167423
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index dd32167b847..1c536a69703 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -65,9 +65,11 @@ namespace clang { TargetOpts(targetopts), LangOpts(langopts), AsmOutStream(OS), + Context(), LLVMIRGeneration("LLVM IR Generation Time"), Gen(CreateLLVMCodeGen(Diags, infile, compopts, C)), - LinkModule(LinkModule) { + LinkModule(LinkModule) + { llvm::TimePassesIsEnabled = TimePasses; } |