When we decide to output a deferred decl, remember the llvm GlobalValue.

We can reuse it to avoid a DenseMap+StringMap lookup to find if it was already
emitted or not.

This fixes a 2010 TODO.

llvm-svn: 196785
This commit is contained in:
Rafael Espindola
2013-12-09 14:59:08 +00:00
parent c3cde36ead
commit c0ff7448d7
3 changed files with 37 additions and 24 deletions

View File

@@ -117,6 +117,8 @@ namespace {
virtual void HandleTranslationUnit(ASTContext &Ctx) {
if (Diags.hasErrorOccurred()) {
if (Builder)
Builder->clear();
M.reset();
return;
}