Skip to content
  • Joel E. Denny's avatar
    [OpenACC] Fix source-to-source bugs due to cpp macros · f135d701
    Joel E. Denny authored
    Without this patch, Clacc source-to-source mode when requested by
    `-fopenacc-print` (but not `-fopenacc-ast-print`) often fails asserts
    or mangles text when certain parts of OpenACC constructs expand from
    preprocessor macros or when the `_Pragma` directive form is used.
    With this patch, Clacc reports error diagnostics for cases not yet
    handled, and other cases are fixed.
    
    Such an error diagnostic is reported when either the first token is
    expanded from a macro (thus the `_Pragma` form is used) or the
    associated statement must be rewritten but its last token is expanded
    from a macro.
    
    This patch also redesigns `ACCExecutableDirective::getConstructRange`
    to support the above changes as well as upcoming changes that will
    provide source location information via the OpenACC Profiling
    Interface.
    f135d701