[all-commits] [llvm/llvm-project] 509854: [clang] Replace asm with __asm__ in cuda header
Jon Chesterfield via All-commits
all-commits at lists.llvm.org
Thu Aug 5 10:47:23 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 509854b69cea0c9261ac21ceb22012a53e7a800b
https://github.com/llvm/llvm-project/commit/509854b69cea0c9261ac21ceb22012a53e7a800b
Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
Date: 2021-08-05 (Thu, 05 Aug 2021)
Changed paths:
M clang/lib/Headers/__clang_cuda_device_functions.h
Log Message:
-----------
[clang] Replace asm with __asm__ in cuda header
Asm is a gnu extension for C, so at present -fopenmp -std=c99
and similar fail to compile on nvptx, bug 51344
Changing to `__asm__` or `__asm` works for openmp, all three appear to work
for cuda. Suggesting `__asm__` here as `__asm` is used by MSVC with different
syntax, so this should make for better error diagnostics if the header is
passed to a compiler other than clang.
Reviewed By: tra, emankov
Differential Revision: https://reviews.llvm.org/D107492
More information about the All-commits
mailing list