[llvm-dev] RFC for f18+runtimes in LLVM

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Fri Mar 8 13:19:51 PST 2019


On 05/03/2019 10:57, Chris Lattner via llvm-dev wrote:
>> On Mar 4, 2019, at 12:03 PM, Michael Kruse<llvmdev at meinersbur.de>  wrote:
>>
>> Am Sa., 2. März 2019 um 11:15 Uhr schrieb Chris Lattner via llvm-dev
>> <llvm-dev at lists.llvm.org>:
>>> I’d be really opposed to flang reusing the Clang ASTs themselves.  C++ is already a complicated language and mixing all of Fortran's concerns (including a completely different object model) will make both of them*worse*  than having them stand alone IMO.
>> Could there be a common base class for flang and clang AST nodes? That
>> is, an abstract class that has children()/dump()/getSourceRange()?
> What useful code (other than trivial dumpers) could work at that level of abstraction?

The main thing that springs to mind is a documentation generator.  It 
needs to be able to find comments associated with some language 
construct, index language constructs, and produce cross references.  You 
would still need to have Fortran-specific support, just as you'd need to 
understand that C++ and Objective-C have different notions of 
inheritance, but a lot of the core infrastructure could be shared if 
clang and f18 exposed compatible interfaces to the AST.

David


More information about the llvm-dev mailing list