llvm-project/clang/lib
Itay Bookstein 9efce0baee [clang] Run LLVM Verifier in modes without CodeGen too
Previously, the Backend_Emit{Nothing,BC,LL} modes did
not run the LLVM verifier since it is usually added via
the TargetMachine::addPassesToEmitFile method according
to the DisableVerify parameter. This is called from
EmitAssemblyHelper::AddEmitPasses, which is only relevant
for BackendAction-s that require CodeGen.

Note:
* In these particular situations the verifier is added
  to the optimization pipeline rather than the codegen
  pipeline so that it runs prior to the BC/LL emission
  pass.
* This change applies to both the old and the new PMs.
* Because the clang tests use -emit-llvm ubiquitously,
  this change will enable the verifier for them.
* A small bug is fixed in emitIFuncDefinition so that
  the clang/test/CodeGen/ifunc.c test would pass:
  the emitIFuncDefinition incorrectly passed the
  GlobalDecl of the IFunc itself to the call to
  GetOrCreateLLVMFunction for creating the resolver.

Signed-off-by: Itay Bookstein <ibookstein@gmail.com>

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D113352
2021-11-09 23:57:13 +02:00
..
APINotes [clang][APINotes] Fix -Wunused-function warning (NFC) 2021-04-01 09:52:43 +08:00
ARCMigrate [clang] [Objective C] Inclusive language: use objcmt-allowlist-dir-path=<arg> instead of objcmt-white-list-dir-path=<arg> 2021-11-05 12:27:05 -04:00
AST Comment AST: Add support for variable templates 2021-11-09 22:30:09 +01:00
ASTMatchers [ASTMatcher] Provide a definition for the lambdaCapture matcher 2021-11-08 20:26:37 +01:00
Analysis [AST, Analysis] Use llvm::reverse (NFC) 2021-11-07 09:53:14 -08:00
Basic [clang] GCC directive extension extension: Hash NNN lines 2021-11-09 07:31:03 -08:00
CodeGen [clang] Run LLVM Verifier in modes without CodeGen too 2021-11-09 23:57:13 +02:00
CrossTU PR51018: Remove explicit conversions from SmallString to StringRef to future-proof against C++23 2021-07-08 13:37:57 -07:00
DirectoryWatcher [clang] [DirectoryWatcher] Remove leading \\?\ from GetFinalPathNameByHandleW 2021-11-08 22:21:30 +02:00
Driver [ARM] reject -mtp=cp15 if target subarch does not support it 2021-11-09 18:29:30 +01:00
Edit [clang] Use llvm::is_contained (NFC) 2021-10-13 20:41:55 -07:00
Format [clang-format] Refactor SpaceBeforeParens to add options 2021-11-09 21:51:45 +01:00
Frontend [SPIR-V] Add SPIR-V triple and clang target info. 2021-11-08 13:34:10 +00:00
FrontendTool [clang] Add plugin ActionType to run command line plugin before main action 2021-10-20 08:58:20 -07:00
Headers Revert "[OpenCL] Allow optional __generic in __remove_address_space utility" 2021-11-09 09:42:17 +00:00
Index [clang] Visit enum base specifiers in libIndex 2021-10-25 13:16:14 +02:00
IndexSerialization
Interpreter Reinstate "[clang-repl] Re-implement clang-interpreter as a test case." 2021-10-26 19:29:56 +00:00
Lex [clang] GCC directive extension extension: Hash NNN lines 2021-11-09 07:31:03 -08:00
Parse Initial parsing/sema for 'align' clause 2021-11-09 07:34:18 -05:00
Rewrite [clang] Use StringRef::contains (NFC) 2021-10-21 08:58:19 -07:00
Sema [clang] Don't crash on an incomplete-type base specifier in template context. 2021-11-09 22:17:47 +01:00
Serialization Initial parsing/sema for 'align' clause 2021-11-09 07:34:18 -05:00
StaticAnalyzer [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration. 2021-11-08 16:17:55 +02:00
Testing
Tooling [clang] Use llvm::{count,count_if,find_if,all_of,none_of} (NFC) 2021-10-25 09:14:45 -07:00
CMakeLists.txt [clang-repl] Recommit "Land initial infrastructure for incremental parsing" 2021-05-13 06:30:29 +00:00