diff options
author | Sean Callanan <scallanan@apple.com> | 2015-04-28 18:24:12 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2015-04-28 18:24:12 +0000 |
commit | 61ea0571ac22e903ec29e528ba2e6ec2899d84ba (patch) | |
tree | f97d7523d4c2d03211461771eea66cf39c354645 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 20b0ce3abd16514407a4454d90fd1c52da0a3a33 (diff) | |
download | llvm-61ea0571ac22e903ec29e528ba2e6ec2899d84ba.zip llvm-61ea0571ac22e903ec29e528ba2e6ec2899d84ba.tar.gz llvm-61ea0571ac22e903ec29e528ba2e6ec2899d84ba.tar.bz2 |
Implemented support for testing the ASTImporter's
ability to generate code that CodeGen likes. Test
cases can use this functionality by calling
// RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s
llvm-svn: 236011
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 60aac07..b06fe42 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -79,6 +79,11 @@ namespace clang { } void Initialize(ASTContext &Ctx) override { + if (Context) { + assert(Context == &Ctx); + return; + } + Context = &Ctx; if (llvm::TimePassesIsEnabled) |