зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
c41a24510b
Коммит
0726779150
|
@ -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)):
|
||||
|
|
Загрузка…
Ссылка в новой задаче