llvm-project/clang/lib/Frontend
Leonard Chan 84c4754372 [clang] Add -fc++-abi= flag for specifying which C++ ABI to use
This implements the flag proposed in RFC
http://lists.llvm.org/pipermail/cfe-dev/2020-August/066437.html.

The goal is to add a way to override the default target C++ ABI through a
compiler flag. This makes it easier to test and transition between different
C++ ABIs through compile flags rather than build flags.

In this patch:

- Store -fc++-abi= in a LangOpt. This isn't stored in a CodeGenOpt because
  there are instances outside of codegen where Clang needs to know what the
  ABI is (particularly through ASTContext::createCXXABI), and we should be
  able to override the target default if the flag is provided at that point.
- Expose the existing ABIs in TargetCXXABI as values that can be passed
  through this flag.
  - Create a .def file for these ABIs to make it easier to check flag values.
  - Add an error for diagnosing bad ABI flag values.

Differential Revision: https://reviews.llvm.org/D85802
2021-05-04 10:52:13 -07:00
..
Rewrite [Windows] Turn off text mode correctly in Rewriter to stop CRLF translation 2021-04-06 10:49:09 -04:00
ASTConsumers.cpp [clang][NFC] Store a pointer to the ASTContext in ASTDumper and TextNodeDumper 2020-07-03 13:59:22 +01:00
ASTMerge.cpp [ASTImporter] Mark erroneous nodes in shared st 2019-07-01 15:37:07 +00:00
ASTUnit.cpp [clang][clangd] Avoid inconsistent target creation 2021-04-06 23:23:34 +08:00
CMakeLists.txt Revert "[Clang] Move assembler into a separate file" 2021-01-23 15:04:27 +01:00
ChainedDiagnosticConsumer.cpp
ChainedIncludesSource.cpp [ASTReader] Allow controlling separately whether validation should be disabled for a PCH vs a module file 2021-01-21 20:45:54 -08:00
CompilerInstance.cpp Modules: Remove an extra early return, NFC 2021-05-03 10:50:09 -07:00
CompilerInvocation.cpp [clang] Add -fc++-abi= flag for specifying which C++ ABI to use 2021-05-04 10:52:13 -07:00
CreateInvocationFromCommandLine.cpp [flang][driver] Add the new flang compiler and frontend drivers 2020-09-11 10:55:54 +01:00
DependencyFile.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
DependencyGraph.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
DiagnosticRenderer.cpp [clang][Frontend] Fix a crash in DiagnosticRenderer. 2021-02-17 09:02:49 +01:00
FrontendAction.cpp [ASTReader] Allow controlling separately whether validation should be disabled for a PCH vs a module file 2021-01-21 20:45:54 -08:00
FrontendActions.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
FrontendOptions.cpp [OpenCL] Added distinct file extension for C++ for OpenCL. 2021-03-24 13:07:04 +00:00
HeaderIncludeGen.cpp Add flag for showing skipped headers in -H / --show-includes output 2021-04-14 17:01:51 +02:00
InitHeaderSearch.cpp [clang][Driver] Implement AddClangSystemIncludeArgs and HasNativeLLVMSupport for the OpenBSD clang driver. 2020-08-23 20:08:40 -04:00
InitPreprocessor.cpp [OpenCL] Introduce new method for validating OpenCL target 2021-04-28 16:00:02 +03:00
InterfaceStubFunctionsConsumer.cpp Revert "[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)" 2021-01-04 23:17:45 +01:00
LayoutOverrideSource.cpp
LogDiagnosticPrinter.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
ModuleDependencyCollector.cpp [SystemZ][z/OS][Windows] Add new OF_TextWithCRLF flag and use this flag instead of OF_Text 2021-04-06 07:23:31 -04:00
MultiplexConsumer.cpp [AST] Add missing MultiplexConsumer::CompleteExternalDeclaration 2019-12-22 19:00:48 -08:00
PrecompiledPreamble.cpp [clang][clangd] Avoid inconsistent target creation 2021-04-06 23:23:34 +08:00
PrintPreprocessedOutput.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00
SerializedDiagnosticPrinter.cpp CrashTracer: clang at clang: llvm::BitstreamWriter::ExitBlock 2020-07-09 20:27:33 -07:00
SerializedDiagnosticReader.cpp Bitstream reader: Fix undefined behavior seen after rL364464 2019-07-05 20:22:40 +00:00
TestModuleFileExtension.cpp [clang][modules] Use extensible RTTI for ModuleFileExtension 2021-03-05 11:11:05 +01:00
TestModuleFileExtension.h [clang][modules] Use extensible RTTI for ModuleFileExtension 2021-03-05 11:11:05 +01:00
TextDiagnostic.cpp [clang-cl] Remove the /fallback option 2021-02-04 10:33:16 +01:00
TextDiagnosticBuffer.cpp Fix more implicit conversions. Getting closer to having clang working with gcc 5 again 2020-01-29 02:57:59 +01:00
TextDiagnosticPrinter.cpp [clang-cl] Remove the /fallback option 2021-02-04 10:33:16 +01:00
VerifyDiagnosticConsumer.cpp Frontend: Migrate to FileEntryRef in VerifyDiagnosticConsumer.cpp, NFC 2020-12-09 11:51:43 -08:00