Bug 918651 - part 2 - don't munge the translation unit's headers; r=ehsan

Keep the builtin headers separate from the translation unit's headers.
We do this so when we start twiddling with the translation unit's headers,
we don't have to handle cases where those headers are actually builtin
headers.
This commit is contained in:
Nathan Froyd 2013-10-01 11:42:50 -04:00
Родитель c41a24510b
Коммит 0726779150
2 изменённых файлов: 3 добавлений и 3 удалений

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

@ -8,7 +8,7 @@ from copy import deepcopy
import ipdl.ast
import ipdl.builtin
from ipdl.cxx.ast import *
from ipdl.type import Actor, ActorType, ProcessGraph, TypeVisitor
from ipdl.type import Actor, ActorType, ProcessGraph, TypeVisitor, builtinHeaderIncludes
# FIXME/cjones: the chromium Message logging code doesn't work on
# gcc/POSIX, because it wprintf()s across the chromium/mozilla
@ -1418,6 +1418,8 @@ class _GenerateProtocolCode(ipdl.ast.Visitor):
hf.addthings(_includeGuardStart(hf))
hf.addthing(Whitespace.NL)
for inc in builtinHeaderIncludes:
self.visitCxxInclude(inc)
ipdl.ast.Visitor.visitTranslationUnit(self, tu)
if tu.filetype == 'header':
self.cppIncludeHeaders.append(_ipdlhHeaderName(tu))

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

@ -597,8 +597,6 @@ With this information, it finally type checks the AST.'''
return False
return True
tu.cxxIncludes = builtinHeaderIncludes + tu.cxxIncludes
# tag each relevant node with "decl" information, giving type, name,
# and location of declaration
if not runpass(GatherDecls(builtinUsing, self.errors)):