llvm-project/clang/lib
Joel E. Denny cbf64b5834 [OpenMP] Fix map clause for unused var: don't ignore it
For example, without this patch:

```
 $ cat test.c
 int main() {
   int x[3];
   #pragma omp target map(tofrom:x[0:3])
 #ifdef USE
   x[0] = 1
 #endif
   ;
   return 0;
 }
 $ clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -S -emit-llvm test.c
 $ grep '^@.offload_maptypes' test.ll
 $ echo $?
 1
 $ clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda -S -emit-llvm test.c \
         -DUSE
 $ grep '^@.offload_maptypes' test.ll
 @.offload_maptypes = private unnamed_addr constant [1 x i64] [i64 35]
```

With this patch, both greps produce the same result.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D83922
2020-07-17 21:37:27 -04:00
..
ARCMigrate With MSVC, file needs to be compiled with /BIGOBJ 2020-07-17 09:43:06 -07:00
AST [Sema][AArch64] Add parsing support for arm_sve_vector_bits attribute 2020-07-17 10:06:54 +00:00
ASTMatchers Make helpers static. NFC. 2020-07-17 13:49:11 +02:00
Analysis [Analyzer] Report every bug if only uniqueing location differs. 2020-07-15 12:19:25 +02:00
Basic [MSP430] Actualize the toolchain description 2020-07-17 15:42:12 +03:00
CodeGen [OpenMP] Fix map clause for unused var: don't ignore it 2020-07-17 21:37:27 -04:00
CrossTU [analyzer] Add CTUImportCppThreshold for C++ files 2020-07-09 15:36:33 +02:00
DirectoryWatcher [DirectoryWatcher] Do not use FSEvents on non-macOS platforms 2020-04-23 10:22:28 -07:00
Driver [MSP430] Actualize the toolchain description 2020-07-17 15:42:12 +03:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format [clang-format] PR46609 clang-format does not obey `PointerAlignment: Right` for ellipsis in declarator for pack 2020-07-12 18:44:26 +01:00
Frontend [CMake] Make `intrinsics_gen` dependency unconditional. 2020-07-17 16:43:17 -07:00
FrontendTool [NFC] Refactor Registry loops to range for 2020-06-19 00:40:10 +01:00
Headers [PowerPC][Power10] Implement Test LSB by Byte Builtins in LLVM/Clang 2020-07-13 22:47:47 -05:00
Index [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
Lex [Lexer] Fix missing coverage line after #endif 2020-07-10 09:05:20 -07:00
Parse [clang] Include type specifiers in typo correction when checking isCXXDeclarationSpecifiers. 2020-07-13 12:05:09 +02:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema recommit 4fc752b30b [CUDA][HIP] Always defer diagnostics for wrong-sided reference 2020-07-17 09:14:39 -04:00
Serialization Summary: [clang] Provide a way for WhileStmt to report the location of its LParen and RParen. 2020-07-10 21:31:16 -04:00
StaticAnalyzer [Analyzer] Hotfix for various crashes in iterator checkers 2020-07-16 20:49:33 +02:00
Testing Fix MSVC "not all control paths return a value" warning. NFC. 2020-06-05 10:45:59 +01:00
Tooling [clang][Tooling] Try to avoid file system access if there is no record for the file in compile_commads.json 2020-07-17 18:49:14 +02:00
CMakeLists.txt Move unittest helpers to a shared location 2020-05-29 16:47:33 +02:00