[Clang] Move assembler into a separate file
authorAyke van Laethem <aykevanlaethem@gmail.com>
Sat, 23 Jan 2021 10:53:24 +0000 (11:53 +0100)
committerAyke van Laethem <aykevanlaethem@gmail.com>
Sat, 23 Jan 2021 13:34:23 +0000 (14:34 +0100)
commit2325157c0568ffd16f3318ad54f947e4e2109ef6
tree626a84e516415537d91d5d6a3bfb04acfd129f47
parenta49a3a3ed568244b12d6f553240485696e084f4a
[Clang] Move assembler into a separate file

This change adds an AssemblerInvocation class, similar to the
CompilerInvocation class. It can be used to invoke cc1as directly.

The project I'm working on wants to compile Clang and use it as a static
library. For that to work, there must be a way to invoke the assembler
programmatically, using the same arguments as you would otherwise pass
to cc1as.

Differential Revision: https://reviews.llvm.org/D63852
clang/include/clang/Frontend/AssemblerInvocation.h [new file with mode: 0644]
clang/lib/Frontend/AssemblerInvocation.cpp [new file with mode: 0644]
clang/lib/Frontend/CMakeLists.txt
clang/tools/driver/cc1as_main.cpp